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()); }
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); }