Package net.officefloor.test
Class JUnitAgnosticAssert
- java.lang.Object
-
- net.officefloor.test.JUnitAgnosticAssert
-
public class JUnitAgnosticAssert extends java.lang.Object
Provides JUnit agnostic assertions.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description JUnitAgnosticAssert()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertEquals(java.lang.Object expected, java.lang.Object actual, java.lang.String message)
Asserts equals.static void
assertFalse(boolean actual, java.lang.String message)
Assertsfalse
.static void
assertNotNull(java.lang.Object actual, java.lang.String message)
Assert notnull
.static void
assertNull(java.lang.Object actual, java.lang.String message)
Assertnull
.static void
assertSame(java.lang.Object expected, java.lang.Object actual, java.lang.String message)
Asserts same.static void
assertTrue(boolean actual, java.lang.String message)
Assertstrue
.static <R> R
fail(java.lang.String message)
Fails.static <R> R
fail(java.lang.Throwable failure)
Propagates the failure.
-
-
-
Method Detail
-
assertNotNull
public static void assertNotNull(java.lang.Object actual, java.lang.String message)
Assert notnull
.- Parameters:
actual
- Actual.message
- Message.
-
assertNull
public static void assertNull(java.lang.Object actual, java.lang.String message)
Assertnull
.- Parameters:
actual
- Actual.message
- Message.
-
assertEquals
public static void assertEquals(java.lang.Object expected, java.lang.Object actual, java.lang.String message)
Asserts equals.- Parameters:
expected
- Expected.actual
- Actual.message
- Message.
-
assertSame
public static void assertSame(java.lang.Object expected, java.lang.Object actual, java.lang.String message)
Asserts same.- Parameters:
expected
- Expected.actual
- Actual.message
- Message.
-
assertTrue
public static void assertTrue(boolean actual, java.lang.String message)
Assertstrue
.- Parameters:
actual
- Actual.message
- Message.
-
assertFalse
public static void assertFalse(boolean actual, java.lang.String message)
Assertsfalse
.- Parameters:
actual
- Actual.message
- Message.
-
fail
public static <R> R fail(java.lang.Throwable failure)
Propagates the failure.- Type Parameters:
R
- Any result.- Parameters:
failure
- Failure.- Returns:
- Never returns, however allows for return statements.
-
fail
public static <R> R fail(java.lang.String message)
Fails.- Type Parameters:
R
- Any result.- Parameters:
message
- Failure message.- Returns:
- Never returns, however allows for return statements.
-
-