public void Test_OrdersView() { // Arrange MVCController controller = new MVCController(new RespiratoryStub()); // Act ViewResult result = controller.OrdersView() as ViewResult; // Assert Assert.IsNotNull(result); Assert.AreEqual(1, ((IEnumerable<Orders>)result.Model).First().OrderID); }
public void Contact() { // Arrange MVCController controller = new MVCController(new RespiratoryStub()); // Act ViewResult result = controller.ProductsView(null) as ViewResult; ViewResult result2 = controller.ProductsView(1) as ViewResult; // Assert Assert.IsNotNull(result); Assert.AreEqual(1, ((IEnumerable<Products>)result.Model).First().ProductID); Assert.AreEqual(1, ((IEnumerable<Products>)result2.Model).First().ProductID); }