コード例 #1
0
        public void ShowView_ReturnsViewResult_True()
        {
            Shipment            shipment   = new Shipment(DateTime.Now);
            ShipmentsController controller = new ShipmentsController();
            ViewResult          showView   = controller.Show(shipment.GetId()) as ViewResult;

            Assert.IsInstanceOfType(showView, typeof(ViewResult));
        }
コード例 #2
0
        public void ShowView_HasCorrectModelType_DictionaryStringObject()
        {
            Shipment            shipment   = new Shipment(DateTime.Now);
            ShipmentsController controller = new ShipmentsController();
            ViewResult          showView   = controller.Show(shipment.GetId()) as ViewResult;
            var result = showView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(Dictionary <string, object>));
        }