public void EndretogPostFeil() { var controller = new DefaultController(new TogLogikk(new Togstub())); var SessionMock = new TestControllerBuilder(); SessionMock.InitializeController(controller); controller.Session["togmelding"] = false; var tog = new TogV(); //Act var resultat13 = (RedirectToRouteResult)controller.Endretog(tog); //Assert Assert.AreEqual(resultat13.RouteName, ""); Assert.AreEqual(resultat13.RouteValues.Values.First(), "Togliste"); }