Exemplo n.º 1
0
        public void TestMethodPut()
        {
            PowerSet set = new PowerSet();

            set.put(22);
            set.put(22);

            Assert.AreEqual(1, set.cnt);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }