Ejemplo n.º 1
0
        public void SETIntersectionSETTest()
        {
            SET <ST> a = new SET <ST>(new ST[] { "A", "B", "C" }),
                     b = new SET <ST>(new ST[] { "B", "C", "D", "E" });

            Assert.AreEqual(2, a.Intersection(b).Count);
        }
        public void SetIntersectTest01()
        {
            // Create sets
            SET <INT> firstSet  = SET <INT> .CreateSET(1, 2, 3, 4),
                      secondSet = SET <INT> .CreateSET(2, 4, 6);

            // Intersect the sets
            SET <INT> resultant = firstSet.Intersection(secondSet);

            Console.WriteLine("The following integers intersect:");
            foreach (var i in resultant)
            {
                Console.WriteLine(i);
            }

            // output:
            // The following integers intersect:
            // 2
            // 4

            resultant.NullFlavor = null;
            Assert.IsTrue(resultant.Validate());
        }
Ejemplo n.º 3
0
 public void SETIntersectionSETTest()
 {
     SET<ST> a = new SET<ST>(new ST[] { "A", "B", "C" }),
         b = new SET<ST>(new ST[] { "B", "C", "D", "E" });
     Assert.AreEqual(2, a.Intersection(b).Count);
 }