new set test

This commit is contained in:
eugenp 2015-12-21 11:37:37 +02:00 committed by David Morley
parent ed8ca6ab8e
commit cb083e23c8
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');