public void TestMethodPut() { PowerSet set = new PowerSet(); set.put(22); set.put(22); Assert.AreEqual(1, set.cnt); }
public void TestMethodUnion2() { PowerSet set1 = new PowerSet(); PowerSet set2 = new PowerSet(); PowerSet dict = new PowerSet(); set1.put(22); set1.put(201); dict = set1.union(set2); Assert.AreEqual(2, dict.cnt); }
public void TestMethodIntersection2() { PowerSet set1 = new PowerSet(); PowerSet set2 = new PowerSet(); PowerSet dict = new PowerSet(); set1.put(22); set1.put(201); set2.put("LOL"); dict = set1.intersection(set2); Assert.AreEqual(0, dict.cnt); }
public void TestMethodDifference2() { PowerSet set1 = new PowerSet(); PowerSet set2 = new PowerSet(); PowerSet dict = new PowerSet(); set1.put(22); set2.put(22); set2.put("hard"); dict = set1.difference(set2); Assert.AreEqual(0, dict.dict.Count); }
public void TestMethodIsSubSet2() { PowerSet set1 = new PowerSet(); PowerSet set2 = new PowerSet(); Dictionary <int, object> dict = new Dictionary <int, object>(); set2.put(22); set2.put("привет"); set2.put("thx"); set1.put(22); set1.put("thx"); bool check = set1.issubset(set2); Assert.AreEqual(false, check); }
public void TestMethodIsSubSet1() { PowerSet set1 = new PowerSet(); PowerSet set2 = new PowerSet(); PowerSet dict = new PowerSet(); set1.put(22); set1.put("привет"); set1.put("thx"); set2.put(22); set2.put("thx"); bool check = set1.issubset(set2); Assert.AreEqual(true, check); }