Class AssertConsumeNone<T>
java.lang.Object
org.soliscode.test.assertions.actions.AssertConsumeNone<T>
- Type Parameters:
T
- element type
- All Implemented Interfaces:
Consumer<T>
,AssertAction
,AssertConsumer<T>
A consumer that expects to consume no objects. It will throw an exception if any object is consumed, including 'null'.
Instead of instantiating this class directly, the AssertActions
utility class should be used:
Consumer<Integer> consumer = AssertActions.consumeNone();
- Since:
- 1.0
- Author:
- evanbergstrom
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a consumer that expect to consume no objects.AssertConsumeNone
(@Nullable String message) Create a consumer that expect to consume no objects.AssertConsumeNone
(@Nullable Supplier<String> messageSupplier) Create a consumer that expect to consume no objects. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.soliscode.test.assertions.actions.AssertAction
assertCheck
-
Constructor Details
-
AssertConsumeNone
public AssertConsumeNone()Create a consumer that expect to consume no objects. -
AssertConsumeNone
Create a consumer that expect to consume no objects. This constructor allows specification of a string to be included in the exception of the assertion fails.- Parameters:
message
- the text to include in the exception.
-
AssertConsumeNone
Create a consumer that expect to consume no objects. This constructor allows specification of a supplier of a message to be included in the exception.- Parameters:
messageSupplier
- the supplier of the text to include in the exception.
-
-
Method Details
-
accept
-