Assertj refactor (#1635)
This commit is contained in:
parent
910826733c
commit
891f0ba981
|
@ -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));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue