예제 #1
0
        public void EndreVare()
        {
            // Arrange
            var controller = new VareController(new VareBLL(new VareDALStub()));

            // Act
            var actionResult = (ViewResult)controller.EndreVare(1);

            // Assert
            Assert.AreEqual(actionResult.ViewName, "");
        }
예제 #2
0
        public void Endre_Ikke_Funnet_Ved_View()
        {
            // Arrange
            var controller = new VareController(new VareBLL(new VareDALStub()));

            // Act
            var actionResult  = (ViewResult)controller.EndreVare(0);
            var kundeResultat = (Vare)actionResult.Model;

            // Assert
            Assert.AreEqual(actionResult.ViewName, "");
            Assert.AreEqual(kundeResultat.ID, 0);
        }