public void DeleteNoId()
        {
            // Act
            ViewResult actual = controller.Delete(null);

            // Assert
            Assert.AreEqual("Error", actual.ViewName);
        }
        public void DeleteLoadPass()
        {
            // act
            ViewResult actual = controller.Delete(1) as ViewResult;

            // assert
            Assert.AreEqual("Delete", actual.ViewName);
        }
示例#3
0
        public void DeleteValidAlbum()
        {
            // Act
            var actual = (Album)controller.Delete(1).Model;

            // Assert
            Assert.AreEqual(albums.ToList()[0], actual);
        }
示例#4
0
        public void Delete()
        {
            createTestObject();

            // Arrange
            StoreManagerController controller = new StoreManagerController();

            // Act
            ViewResult result = controller.Delete(beanBag.id) as ViewResult;

            // Assert
            Assert.IsNotNull(result);

            deleteTestObject(beanBag.id);
        }