Package org.eolang
Class Expect<T>
java.lang.Object
org.eolang.Expect<T>
- Type Parameters:
T- The type of result
This wrapper helps us explain our expectations in an error
message that we throw.
- Since:
- 0.41.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classTransform Expect to Integer.static final classTransform Expect to Natural number.static final classTransform Expect to Number. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Expect
Ctor.- Parameters:
subj- The subjectsupplier- The supplier
-
-
Method Details
-
at
Starting point.- Parameters:
phi- The objectattr- Attribute name- Returns:
- Expect pipeline
-
that
Assert that it passes.- Type Parameters:
R- Type of result- Parameters:
fun- The function to transform- Returns:
- New object
-
otherwise
Fail with this message otherwise.- Parameters:
message- The error message- Returns:
- Next object
-
must
Assert on it.- Parameters:
fun- The check.- Returns:
- Next object
-
it
Return it.- Returns:
- The token
-