Merge remote-tracking branch 'upstream/master'

This commit is contained in:
DOHA 2014-11-04 21:29:46 +02:00
commit be107e735e
1 changed files with 13 additions and 11 deletions

View File

@ -111,8 +111,10 @@ public class GuavaCollectionTypesTest {
assertThat(immutable, contains("John", "Adam", "Jane", "Tom"));
}
// sets
@Test
public void whenCalculateUnion_thenCorrect() {
public void whenCalculateUnionOfSets_thenCorrect() {
final Set<Character> first = ImmutableSet.of('a', 'b', 'c');
final Set<Character> second = ImmutableSet.of('b', 'c', 'd');
@ -120,15 +122,6 @@ public class GuavaCollectionTypesTest {
assertThat(union, containsInAnyOrder('a', 'b', 'c', 'd'));
}
@Test
public void whenCalculateIntersection_thenCorrect() {
final Set<Character> first = ImmutableSet.of('a', 'b', 'c');
final Set<Character> second = ImmutableSet.of('b', 'c', 'd');
final Set<Character> intersection = Sets.intersection(first, second);
assertThat(intersection, containsInAnyOrder('b', 'c'));
}
@Test
public void whenCalculateSetsProduct_thenCorrect() {
final Set<Character> first = ImmutableSet.of('a', 'b');
@ -147,7 +140,16 @@ public class GuavaCollectionTypesTest {
}
@Test
public void whenCalculatePowerSet_thenCorrect() {
public void whenCalculatingSetIntersection_thenCorrect() {
final Set<Character> first = ImmutableSet.of('a', 'b', 'c');
final Set<Character> second = ImmutableSet.of('b', 'c', 'd');
final Set<Character> intersection = Sets.intersection(first, second);
assertThat(intersection, containsInAnyOrder('b', 'c'));
}
@Test
public void whenCalculatingPowerSet_thenCorrect() {
final Set<Character> chars = ImmutableSet.of('a', 'b');
final Set<Set<Character>> result = Sets.powerSet(chars);