public void SlettAvgang()
        {
            var controller = new LoginnController(new AvgangLogikk(new AvgangRepositoryStub()));


            var actionResult = (ViewResult)controller.slettAvgang(1);
            var resultat     = (Avgang)actionResult.Model;


            Assert.AreEqual(actionResult.ViewName, "");
        }
        public void SlettAvgang_ikke_funnet_Post()
        {
            var controller = new LoginnController(new AvgangLogikk(new AvgangRepositoryStub()));
            var innavgang  = new Avgang()
            {
                FraogTiltid = "10:30-17:30",
                Lengdne     = "7timer",
                Price       = 599,
                StrekningId = 1
            };


            var actionResult = (ViewResult)controller.slettAvgang(0, innavgang);


            Assert.AreEqual(actionResult.ViewName, "");
        }
        public void SlettetAvgang_funnet_Post()
        {
            var controller = new LoginnController(new AvgangLogikk(new AvgangRepositoryStub()));
            var innavgang  = new Avgang()
            {
                FraogTiltid = "10:30-17:30",
                Lengdne     = "7timer",
                Price       = 599
            };


            var actionResult = (RedirectToRouteResult)controller.slettAvgang(1, innavgang);


            Assert.AreEqual(actionResult.RouteName, "");
            Assert.AreEqual(actionResult.RouteValues.Values.First(), "HentAlleAvgang");
        }