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)); }
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>)); }