Ejemplo n.º 1
0
        public void DeleteTest()
        {
            var controller = new BuildingsController();
            var result     = controller.Index() as ViewResult;
            var buildings  = (ICollection <Building>)result.ViewData.Model;
            var Id         = buildings.Last().BuildingId;

            controller.DeleteConfirmed(Id);

            var result2    = controller.Index() as ViewResult;
            var buildings2 = (ICollection <Building>)result.ViewData.Model;

            Assert.AreNotEqual(Id, buildings2.Last().BuildingId);
        }
Ejemplo n.º 2
0
        public void TestDeleteConfirmed()
        {
            var result = controller.DeleteConfirmed(3) as HttpNotFoundResult;

            result.Should().Be(null);
        }