Package io.cucumber.datatable.matchers
Class DataTableHasTheSameRowsAs
- All Implemented Interfaces:
org.hamcrest.Matcher<DataTable>,org.hamcrest.SelfDescribing
@API(status=STABLE)
public final class DataTableHasTheSameRowsAs
extends org.hamcrest.TypeSafeDiagnosingMatcher<DataTable>
Matches two data tables by their rows. By default the matcher does not take
row order into account. This can be fluently enabled.
assertThat(identical, hasTheSameRowsAs(table).inOrder()); assertThat(shuffled, hasTheSameRowsAs(table));
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDataTableHasTheSameRowsAs(DataTable expectedValue, boolean unordered) -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeTo(org.hamcrest.Description description) static DataTableHasTheSameRowsAshasTheSameRowsAs(DataTable operand) inOrder()Compare the rows of the data table in order.protected booleanmatchesSafely(DataTable item, org.hamcrest.Description description) Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Field Details
-
expectedValue
-
unordered
private final boolean unordered
-
-
Constructor Details
-
DataTableHasTheSameRowsAs
-
-
Method Details
-
describeTo
public void describeTo(org.hamcrest.Description description) -
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeDiagnosingMatcher<DataTable>
-
inOrder
Compare the rows of the data table in order.- Returns:
- a new matcher that compares the rows of the data table in order.
-
hasTheSameRowsAs
-