@Test public void properSubsetNotEmpty() { MutableSet<String> singletonSet = UnifiedSet.newSetWith("Bertha"); MutableSet<String> doubletonSet = UnifiedSet.newSetWith("Bertha", "Myra"); Assert.assertTrue(Sets.isProperSubsetOf(singletonSet, doubletonSet)); Assert.assertFalse(Sets.isProperSubsetOf(doubletonSet, singletonSet)); }
@Test public void properSubsetEqual() { MutableSet<String> setA = UnifiedSet.newSetWith("Bertha", null, "Myra"); MutableSet<String> setB = UnifiedSet.newSetWith("Myra", "Bertha", null); Assert.assertFalse(Sets.isProperSubsetOf(setA, setB)); Assert.assertFalse(Sets.isProperSubsetOf(setB, setA)); }
@Test public void properSubsetEmpty() { MutableSet<String> emptySet = mSet(); MutableSet<String> singletonSet = UnifiedSet.newSetWith("Bertha"); Assert.assertTrue(Sets.isProperSubsetOf(emptySet, singletonSet)); Assert.assertFalse(Sets.isProperSubsetOf(singletonSet, emptySet)); }