Exemplo n.º 1
0
 public void Contiene()
 {
     c1 += 2;
     Assert.AreEqual(1, c1.Size());
     Assert.AreEqual(true, c1[2]);
     Assert.AreEqual(false, c1[3]);
 }
Exemplo n.º 2
0
 public void Borrar()
 {
     c1 += 2;
     Assert.AreEqual(1, c1.Size());
     c1 -= 0;
     Assert.AreEqual(0, c1.Size());
 }
Exemplo n.º 3
0
 public void Añadir()
 {
     c1 += 2;
     Assert.AreEqual(1, c1.Size());
     c1 += 2;
     Assert.AreEqual(1, c1.Size());
 }
Exemplo n.º 4
0
        public void Diferencia()
        {
            c1 += 2;
            c1 += 4;
            Assert.AreEqual(2, c1.Size());

            c2 += 2;
            c2 += 9;
            Assert.AreEqual(2, c2.Size());

            c2 = c2 - c1;
            Assert.AreEqual(1, c2.Size());
        }
Exemplo n.º 5
0
        public void Union()
        {
            c1 += 2;
            c1 += 4;
            Assert.AreEqual(2, c1.Size());

            c2 += 2;
            c2 += 9;
            Assert.AreEqual(2, c2.Size());
            
            c2 = c2 | c1;
            Assert.AreEqual(3, c2.Size());
        }
Exemplo n.º 6
0
        public void Interseccion()
        {
            c1 += 2;
            c1 += 3;
            c1 += 4;
            Assert.AreEqual(3, c1.Size());

            c2 += 2;
            c2 += 9;
            c2 += 3;
            Assert.AreEqual(3, c2.Size());

            c2 = c2 & c1;
            Assert.AreEqual(2, c2.Size());
        }