public void Intersection() { // Intersection with empty set Assert.AreEqual(0, testPowerSet1.Intersection(testPowerSet0).capacity); // Intersection with PowerSet2 contains 5 items (expected 2 items) testPowerSet = testPowerSet1.Intersection(testPowerSet2); Assert.AreEqual(2, testPowerSet.capacity); Assert.AreEqual(true, testPowerSet.Get(14)); Assert.AreEqual(true, testPowerSet.Get(16)); Assert.AreEqual(false, testPowerSet.Get(100)); // Putting 5 items to empty set testPowerSet0.Put(101); testPowerSet0.Put(102); testPowerSet0.Put(103); testPowerSet0.Put(104); testPowerSet0.Put(105); Assert.AreEqual(5, testPowerSet0.capacity); // Intersection with PowerSet0 contains 5 different items (expected empty set) testPowerSet = testPowerSet1.Intersection(testPowerSet0); Assert.AreEqual(0, testPowerSet.capacity); Assert.AreEqual(false, testPowerSet.Get(101)); }