Skip to content

Commit

Permalink
Add missing private constructors to utilities classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbduncan authored and Andrei94 committed Jun 23, 2018
1 parent 974a807 commit 275bc06
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
*/
class AssertAll {

///CLOVER:OFF
private AssertAll() {
/* no-op */
}
///CLOVER:ON

static void assertAll(Executable... executables) {
assertAll(null, executables);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
*/
class AssertArrayEquals {

///CLOVER:OFF
private AssertArrayEquals() {
/* no-op */
}
///CLOVER:ON

static void assertArrayEquals(boolean[] expected, boolean[] actual) {
assertArrayEquals(expected, actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
*/
class AssertEquals {

///CLOVER:OFF
private AssertEquals() {
/* no-op */
}
///CLOVER:ON

static void assertEquals(byte expected, byte actual) {
assertEquals(expected, actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
*/
class AssertFalse {

///CLOVER:OFF
private AssertFalse() {
/* no-op */
}
///CLOVER:ON

static void assertFalse(boolean condition) {
assertFalse(() -> condition, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
*/
class AssertIterableEquals {

///CLOVER:OFF
private AssertIterableEquals() {
/* no-op */
}
///CLOVER:ON

static void assertIterableEquals(Iterable<?> expected, Iterable<?> actual) {
assertIterableEquals(expected, actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
*/
class AssertLinesMatch {

///CLOVER:OFF
private AssertLinesMatch() {
/* no-op */
}
///CLOVER:ON

private final static int MAX_SNIPPET_LENGTH = 21;

static void assertLinesMatch(List<String> expectedLines, List<String> actualLines) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
*/
class AssertNotEquals {

///CLOVER:OFF
private AssertNotEquals() {
/* no-op */
}
///CLOVER:ON

static void assertNotEquals(Object unexpected, Object actual) {
assertNotEquals(unexpected, actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
*/
class AssertNotNull {

///CLOVER:OFF
private AssertNotNull() {
/* no-op */
}
///CLOVER:ON

static void assertNotNull(Object actual) {
assertNotNull(actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
*/
class AssertNotSame {

///CLOVER:OFF
private AssertNotSame() {
/* no-op */
}
///CLOVER:ON

static void assertNotSame(Object unexpected, Object actual) {
assertNotSame(unexpected, actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
*/
class AssertNull {

///CLOVER:OFF
private AssertNull() {
/* no-op */
}
///CLOVER:ON

static void assertNull(Object actual) {
assertNull(actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
*/
class AssertSame {

///CLOVER:OFF
private AssertSame() {
/* no-op */
}
///CLOVER:ON

static void assertSame(Object expected, Object actual) {
assertSame(expected, actual, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
*/
class AssertThrows {

///CLOVER:OFF
private AssertThrows() {
/* no-op */
}
///CLOVER:ON

static <T extends Throwable> T assertThrows(Class<T> expectedType, Executable executable) {
return assertThrows(expectedType, executable, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
*/
class AssertTimeout {

///CLOVER:OFF
private AssertTimeout() {
/* no-op */
}
///CLOVER:ON

static void assertTimeout(Duration timeout, Executable executable) {
assertTimeout(timeout, executable, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
*/
class AssertTrue {

///CLOVER:OFF
private AssertTrue() {
/* no-op */
}
///CLOVER:ON

static void assertTrue(boolean condition) {
assertTrue(() -> condition, () -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
@API(Maintained)
public final class Assumptions {

///CLOVER:OFF
private Assumptions() {
/* no-op */
}
///CLOVER:ON

// --- assumeTrue ----------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
@API(Internal)
public final class TestRuleAnnotatedMemberFactory {

///CLOVER:OFF
private TestRuleAnnotatedMemberFactory() {
/* no-op */
}
///CLOVER:ON

public static TestRuleAnnotatedMember from(Object testInstance, Member member) {
if (member instanceof Method) {
return new TestRuleAnnotatedMethod(testInstance, (Method) member);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
@API(Internal)
public final class AnnotationConsumerInitializer {

///CLOVER:OFF
private AnnotationConsumerInitializer() {
/* no-op */
}
///CLOVER:ON

// @formatter:off
private static final Predicate<Method> isAnnotationConsumerAcceptMethod = method ->
method.getName().equals("accept")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
@API(Experimental)
public class LauncherFactory {

///CLOVER:OFF
private LauncherFactory() {
/* no-op */
}
///CLOVER:ON

/**
* Factory method for creating a new {@link Launcher} using dynamically
* detected test engines.
Expand Down

0 comments on commit 275bc06

Please sign in to comment.