Beispiel #1
0
        public void ShowNullInscription()
        {
            var jumelageController = new JumelageController();

            var result = jumelageController.Details(null);

            Assert.AreEqual(typeof(HttpStatusCodeResult), result.GetType());
            Assert.AreEqual((int)HttpStatusCode.BadRequest, ((HttpStatusCodeResult)result).StatusCode);
        }
Beispiel #2
0
        public void TestRetourneListeJoursSemaine()
        {
            var jumelageController = new JumelageController();

            var joursSem = jumelageController.RetourneListeJoursSemaine();

            Assert.AreEqual(joursSem[0], "Lundi");
            Assert.AreEqual(joursSem[1], "Mardi");
            Assert.AreEqual(joursSem[2], "Mercredi");
            Assert.AreEqual(joursSem[3], "Jeudi");
            Assert.AreEqual(joursSem[4], "Vendredi");
        }
Beispiel #3
0
        public void TestRetourneNbreJumelageEtudiant()
        {
            var    jumelageController = new JumelageController();
            string statut;
            var    i = 0;

            while (i <= 3)
            {
                statut = jumelageController.RetourneNbreJumelageEtudiant(i);
                Assert.IsNotNull(statut);
                i++;
            }

            statut = jumelageController.RetourneNbreJumelageEtudiant(0);
            Assert.AreEqual(statut, "Non jumelé");
        }