Package com.dougnoel.sentinel.assertions
Class TableAssert
java.lang.Object
com.dougnoel.sentinel.assertions.TableAssert
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected constructor since this is a static class -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertEquals
(Table table, Object expected, Callable<Object> objectCallable) Assert a table method returns an object equal to the expected object.static void
Assert a table method returns an object equal to the expected object.static void
assertFalse
(Table table, Callable<Boolean> booleanCallable) Assert a table method returns false.static void
assertFalse
(String message, Table table, Callable<Boolean> booleanCallable) Assert a table method returns false.static void
assertNotEquals
(Table table, Object notExpected, Callable<Object> objectCallable) Assert a table method returns an object unequal to the notExpected object.static void
Assert a table method returns an object unequal to the notExpected object.static void
assertTrue
(Table table, Callable<Boolean> booleanCallable) Assert a table method returns true.static void
assertTrue
(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.
-