Exemple #1
0
        public void Complement()
        {
            var s1 = new Set<int>() { 1, 2, 3, 4, 5 };
            var s2 = new Set<int>() { 2, 4, 5, 6, 8, 10 };

            var s3 = s1.Complement(s2);
            Console.Out.WriteLine(s3);

            Assert.That(s3, Has.Count.EqualTo(2), "Incorrect number of elements.");
            Assert.That(s3, Has.Member(1), "Missing element.");
            Assert.That(s3, Has.No.Member(10), "Element should not be present.");
        }