Package com.dougnoel.sentinel.assertions
Class TableAssert
java.lang.Object
com.dougnoel.sentinel.assertions.TableAssert
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotected constructor since this is a static class -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertEquals(Table table, Object expected, Callable<Object> objectCallable) Assert a table method returns an object equal to the expected object.static voidAssert a table method returns an object equal to the expected object.static voidassertFalse(Table table, Callable<Boolean> booleanCallable) Assert a table method returns false.static voidassertFalse(String message, Table table, Callable<Boolean> booleanCallable) Assert a table method returns false.static voidassertNotEquals(Table table, Object notExpected, Callable<Object> objectCallable) Assert a table method returns an object unequal to the notExpected object.static voidAssert a table method returns an object unequal to the notExpected object.static voidassertTrue(Table table, Callable<Boolean> booleanCallable) Assert a table method returns true.static voidassertTrue(String message, Table table, Callable<Boolean> booleanCallable) Assert a table method returns true.
-
Constructor Details
-
TableAssert
protected TableAssert()protected constructor since this is a static class
-
-
Method Details
-
assertTrue
Assert a table method returns true.- Parameters:
table- Table the table object.booleanCallable- Callable<Boolean> A callable function (lambda) that returns true or false.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertTrue
public static void assertTrue(String message, Table table, Callable<Boolean> booleanCallable) throws Exception Assert a table method returns true.- Parameters:
message- String message to print out if the assertion fails.table- Table the table object.booleanCallable- Callable<Boolean> A callable function (lambda) that returns true or false.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertFalse
Assert a table method returns false.- Parameters:
table- Table the table object.booleanCallable- Callable<Boolean> A callable function (lambda) that returns true or false.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertFalse
public static void assertFalse(String message, Table table, Callable<Boolean> booleanCallable) throws Exception Assert a table method returns false.- Parameters:
message- String message to print out if the assertion fails.table- Table the table object.booleanCallable- Callable<Boolean> A callable function (lambda) that returns true or false.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertEquals
public static void assertEquals(String message, Table table, Object expected, Callable<Object> objectCallable) throws Exception Assert a table method returns an object equal to the expected object.- Parameters:
message- String message to print out if the assertion fails.table- Table the table object.expected- Object the expected object to compare againstobjectCallable- Callable<Object> A callable function (lambda) that returns an object.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertEquals
public static void assertEquals(Table table, Object expected, Callable<Object> objectCallable) throws Exception Assert a table method returns an object equal to the expected object.- Parameters:
table- Table the table object.expected- Object the expected object to compare againstobjectCallable- Callable<Object> A callable function (lambda) that returns an object.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertNotEquals
public static void assertNotEquals(String message, Table table, Object notExpected, Callable<Object> objectCallable) throws Exception Assert a table method returns an object unequal to the notExpected object.- Parameters:
message- String message to print out if the assertion fails.table- Table the table object.notExpected- Object the not-expected object to compare against.objectCallable- Callable<Object> A callable function (lambda) that returns an object.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-
assertNotEquals
public static void assertNotEquals(Table table, Object notExpected, Callable<Object> objectCallable) throws Exception Assert a table method returns an object unequal to the notExpected object.- Parameters:
table- Table the table object.notExpected- Object the not-expected object to compare against.objectCallable- Callable<Object> A callable function (lambda) that returns an object.- Throws:
Exception- if the assertion fails or the table method throws an exception.
-