new set test

This commit is contained in:
eugenp 2015-12-21 11:37:37 +02:00
parent 8238c11c80
commit 30f53b76ee
1 changed files with 9 additions and 0 deletions

View File

@ -148,6 +148,15 @@ public class GuavaCollectionTypesTest {
assertThat(intersection, containsInAnyOrder('b', 'c'));
}
@Test
public void whenCalculatingSetSymetricDifference_thenCorrect() {
final Set<Character> first = ImmutableSet.of('a', 'b', 'c');
final Set<Character> second = ImmutableSet.of('b', 'c', 'd');
final Set<Character> intersection = Sets.symmetricDifference(first, second);
assertThat(intersection, containsInAnyOrder('a', 'd'));
}
@Test
public void whenCalculatingPowerSet_thenCorrect() {
final Set<Character> chars = ImmutableSet.of('a', 'b');