@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class) public void testDistinctSorted(String name, TestData.OfRef<Integer> data) { Collection<Integer> result = withData(data) .stream(s -> s.distinct().sorted(), new CollectorOps.TestParallelSizedOp<>()) .exercise(); assertUnique(result); assertSorted(result); }
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class) public void testSortedDistinct(String name, TestData.OfRef<Integer> data) { Collection<Integer> result = withData(data) .stream(s -> s.sorted().distinct(), new CollectorOps.TestParallelSizedOp<>()) .exercise(); assertUnique(result); assertSorted(result); }