예제 #1
0
        public void TestCreateForRedirect()
        {
            EtudiantController contro = new EtudiantController(_stubMock);
            etudiant           et     = new etudiant();


            var result = contro.Create(et) as RedirectToRouteResult;

            Assert.AreEqual("Index", result.RouteValues["Action"]);
        }
예제 #2
0
        public void TestCreateIsCalled()
        {
            EtudiantController contro = new EtudiantController(_stubMock);

            etudiant et = new etudiant();


            var result = contro.Create(et);

            _stubMock.Received().CreateNewEtudiant(et);// tester si Getdonnee a ete appele
        }