Exemplo n.º 1
0
        public void TestAjouterLienCollection()
        {
            Collection collection  = new Collection();
            Lien       exempleLien = new Lien("Example", "example.com");

            collection.Ajouter(exempleLien);

            Assert.AreEqual(1, collection.Compte);
            Assert.AreEqual(exempleLien.ToString(), collection.Get(0).ToString());
        }
Exemplo n.º 2
0
        public void TestCreerLien()
        {
            string Titre = "Wikipedia";
            string URL   = "wikipedia.org";

            Lien lien = new Lien("Wikipedia", "wikipedia.org");

            Assert.AreEqual(Titre, lien._titre);
            Assert.AreEqual(URL, lien._url);
            Assert.AreEqual(Titre + " " + URL, lien.ToString());
        }
Exemplo n.º 3
0
        public void TestCreerLienSansProtocole()
        {
            string titre = "Wikipedia";
            string url   = "wikipedia.org";

            Lien lien = new Lien(titre, url);

            Assert.AreEqual(titre, lien.Titre);
            Assert.AreEqual("http://" + url, lien.Url);
            Assert.AreEqual(titre + " http://" + url, lien.ToString());
        }
Exemplo n.º 4
0
        public void TestCreerLien()
        {
            string Titre = "Wikipedia";
            string URL   = "http://wikipedia.org";

            Lien lien = new Lien(Titre, URL);

            Assert.AreEqual(Titre, lien.titre);
            Assert.AreEqual(URL, lien.Url);
            Assert.AreEqual(Titre + " " + URL, lien.ToString());
        }