Пример #1
0
        public void GeenLeerlingRedirectNaarHomeController()
        {
            RedirectToRouteResult result = _klimatogramController.Index(null) as RedirectToRouteResult;

            Assert.AreEqual("Index", result.RouteValues["action"]);
            Assert.AreEqual("Home", result.RouteValues["controller"]);
        }
Пример #2
0
        public void TestIndexMetLeerlingNietActief()
        {
            Leerling l = new Leerling();

            l.IsActief = false;

            var result = controller.Index(l) as RedirectToRouteResult;

            Assert.IsFalse(l.IsActief);
            Assert.AreEqual("Index", result.RouteValues["Action"]);
            Assert.AreEqual("Home", result.RouteValues["Controller"]);
        }