public void Cost_ReturnsCorrectView_True() { ParcelsController controller = new ParcelsController(); IActionResult indexView = controller.Cost(2, 2, 2, 2); Assert.IsInstanceOfType(indexView, typeof(ViewResult)); }
public void Cost_HasCorrectModelType_ShippingItem() { //Arrange ParcelsController controller = new ParcelsController(); ViewResult costDataType = controller.Cost(2, 2, 2, 2) as ViewResult; //Act var result = costDataType.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(ShippingItem)); }