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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddescribeTo(Description description)static DataTableHasTheSameRowsAshasTheSameRowsAs(DataTable operand)DataTableHasTheSameRowsAsinOrder()Compare the rows of the data table in order.protected booleanmatchesSafely(DataTable item, Description description)-
Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matches
-
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
-
-
-
Method Detail
-
describeTo
public void describeTo(Description description)
-
matchesSafely
protected boolean matchesSafely(DataTable item, Description description)
- Specified by:
matchesSafelyin classTypeSafeDiagnosingMatcher<DataTable>
-
inOrder
public DataTableHasTheSameRowsAs 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
public static DataTableHasTheSameRowsAs hasTheSameRowsAs(DataTable operand)
-
-