@Override public void check(View view, NoMatchingViewException noViewFoundException) { StringDescription description = new StringDescription(); RecyclerView recyclerView = (RecyclerView) view; sortedList = withAdapter.itemsToSort(recyclerView); checkIsNotEmpty(view, description); description.appendText("The list " + sortedList + " is not sorted"); assertTrue(description.toString(), Ordering.natural().<T>isOrdered(sortedList)); }
@Override public void check(View view, NoMatchingViewException noViewFoundException) { StringDescription description = new StringDescription(); RecyclerView recyclerView = (RecyclerView) view; sortedList = withAdapter.itemsToSort(recyclerView); checkIsNotEmpty(view, description); description.appendText("The list "+ sortedList + " is not sorted"); assertTrue(description.toString(), Ordering.natural().<T>isOrdered(sortedList)); }