Merge pull request #67 from Doha2012/master
Modify Class GuavaCollectionTypesTest
This commit is contained in:
		
						commit
						12b73b9ff3
					
				| @ -120,6 +120,15 @@ 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'); | ||||
| @ -137,6 +146,19 @@ public class GuavaCollectionTypesTest { | ||||
|         assertThat(joined, containsInAnyOrder("a c", "a d", "b c", "b d")); | ||||
|     } | ||||
| 
 | ||||
|     @Test | ||||
|     public void whenCalculatePowerSet_thenCorrect() { | ||||
|         final Set<Character> chars = ImmutableSet.of('a', 'b'); | ||||
|         final Set<Set<Character>> result = Sets.powerSet(chars); | ||||
| 
 | ||||
|         final Set<Character> empty = ImmutableSet.<Character> builder().build(); | ||||
|         final Set<Character> a = ImmutableSet.of('a'); | ||||
|         final Set<Character> b = ImmutableSet.of('b'); | ||||
|         final Set<Character> aB = ImmutableSet.of('a', 'b'); | ||||
| 
 | ||||
|         assertThat(result, contains(empty, a, b, aB)); | ||||
|     } | ||||
| 
 | ||||
|     @Test | ||||
|     public void whenCreateRangeOfIntegersSet_thenCreated() { | ||||
|         final int start = 10; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user