public void LoggUt1() { var SessionMock = new TestControllerBuilder(); var controller = new LoginnController(); SessionMock.InitializeController(controller); controller.Session["LoggetInn"] = null; var result = (RedirectToRouteResult)controller.LoggUt(); Assert.AreEqual(result.RouteName, ""); Assert.AreEqual(result.RouteValues.Values.First(), "Index"); }