Package io.cucumber.datatable.matchers
Class DataTableHasTheSameRowsAs
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<DataTable>
io.cucumber.datatable.matchers.DataTableHasTheSameRowsAs
- All Implemented Interfaces:
Matcher<DataTable>,SelfDescribing
@API(status=STABLE)
public final class DataTableHasTheSameRowsAs
extends 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));
-
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeTo(Description description) static DataTableHasTheSameRowsAshasTheSameRowsAs(DataTable operand) inOrder()Compare the rows of the data table in order.protected booleanmatchesSafely(DataTable item, 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
-
Method Details
-
describeTo
-
matchesSafely
- Specified by:
matchesSafelyin classTypeSafeDiagnosingMatcher<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
-