Package org.qaddict
Class Assert
java.lang.Object
org.qaddict.Assert
Assertion entry point
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringdescribe(ActualValueNode node) Describe the mismatched parts from the evaluation details.static <D> Dthat(D data, Expectation<? super D> expectation) Assert, that provided data satisfies the expectation.
-
Constructor Details
-
Assert
public Assert()
-
-
Method Details
-
that
Assert, that provided data satisfies the expectation. In case, that it satisfies the expectation, then the method returns the data itself. If not, then AssertionError is thrown with description, which extracts the mismatched details.- Type Parameters:
D- Type of the validated data.- Parameters:
data- Data to be exercised by the expectation.expectation- Expectation to apply on the data.- Returns:
- Tha data, if it meets the expectation.
-
describe
Describe the mismatched parts from the evaluation details.- Parameters:
node- Node representing the full detail of information about the expectation evaluation.- Returns:
- String with listed mismatches causing the validation failure.
-