Assertj refactor (#1635)

This commit is contained in:
Grzegorz Piwowarek 2017-04-13 02:11:05 +02:00 committed by KevinGilmore
parent 910826733c
commit 891f0ba981
1 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class WordCountIntegrationTest { public class WordCountIntegrationTest {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); private final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
@Test @Test
public void givenDataSet_whenExecuteWordCount_thenReturnWordCount() throws Exception { public void givenDataSet_whenExecuteWordCount_thenReturnWordCount() throws Exception {
@ -65,8 +65,8 @@ public class WordCountIntegrationTest {
List<Integer> ages = personDataSource.map(p -> p.age).collect(); List<Integer> ages = personDataSource.map(p -> p.age).collect();
//then //then
assertThat(ages.size()).isEqualTo(2); assertThat(ages).hasSize(2);
assertThat(ages.containsAll(Arrays.asList(23, 75))).isTrue(); assertThat(ages).contains(23, 75);
} }
@ -110,8 +110,8 @@ public class WordCountIntegrationTest {
.collect(); .collect();
//then //then
assertThat(joined.size()).isEqualTo(1); assertThat(joined).hasSize(1);
assertThat(joined.contains(new Tuple2<>(firstTransaction, address))); assertThat(joined).contains(new Tuple2<>(firstTransaction, address));
} }