示例#1
0
        public void Cost_ReturnsCorrectView_True()
        {
            ParcelsController controller = new ParcelsController();

            IActionResult indexView = controller.Cost(2, 2, 2, 2);

            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
示例#2
0
        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));
        }