Example #1
0
        public void TestInverserListe()
        {
            GenericSimplementChainee <int> chaine = new GenericSimplementChainee <int>();

            chaine.AddLast(2);
            chaine.Inverser();
            chaine.DisplayChaine();

            chaine.AddLast(1);
            chaine.Inverser();
            chaine.DisplayChaine();

            chaine.AddLast(3);
            chaine.AddLast(4);
            chaine.Inverser();
            chaine.DisplayChaine();

            Assert.AreEqual(4, chaine.NbElement);
        }
Example #2
0
        public void TestAddString()
        {
            GenericSimplementChainee <string> myChaineString = new GenericSimplementChainee <string>();

            myChaineString.AddLast("Riri");
            myChaineString.AddLast("Fifi");
            myChaineString.AddLast("Loulou");
            myChaineString.DisplayChaine();

            Assert.AreEqual(myChaineString.NbElement, 3);
        }
Example #3
0
        public void TestAddEnTete()
        {
            GenericSimplementChainee <int> chaine = new GenericSimplementChainee <int>();

            chaine.AddFirst(3);
            chaine.AddFirst(1);
            chaine.AddFirst(42);
            chaine.AddFirst(12);
            chaine.DisplayChaine();

            Assert.AreEqual(chaine.NbElement, 4);
        }