@Override @Test public void symmetricDifference() { Assert.assertEquals( UnifiedSet.newSetWith(999), this.classUnderTest().symmetricDifference(UnifiedSet.newSetWith(999))); }
@Override @Test public void union() { Assert.assertEquals( UnifiedSet.newSetWith(1, 2, 3), this.classUnderTest().union(UnifiedSet.newSetWith(1, 2, 3))); }
@Override @Test public void difference() { ImmutableSet<Integer> set = this.classUnderTest(); ImmutableSet<Integer> difference = set.difference(UnifiedSet.newSetWith(1, 2, 3, 999)); Assert.assertEquals(UnifiedSet.<Integer>newSet(), difference); Assert.assertEquals(set, set.difference(UnifiedSet.newSetWith(999))); }
@Override @Test public void unionInto() { Assert.assertEquals( UnifiedSet.newSetWith(1, 2, 3), this.classUnderTest() .unionInto(UnifiedSet.newSetWith(1, 2, 3), UnifiedSet.<Integer>newSet())); }
@Override @Test public void intersect() { Assert.assertEquals( UnifiedSet.<String>newSet(), this.classUnderTest().intersect(UnifiedSet.newSetWith(1, 2, 3))); }
@Test public void testContainsAll() { Assert.assertTrue(this.classUnderTest().castToSet().containsAll(new HashSet<Object>())); Assert.assertFalse(this.classUnderTest().castToSet().containsAll(UnifiedSet.newSetWith(1))); }