public void EditNullTest() { DistributionsController controller = new DistributionsController(); var response = controller.Edit(null) as HttpStatusCodeResult; Assert.AreEqual(response.StatusCode, 400); }
public void EditValidTest() { DistributionsController controller = new DistributionsController(ordersUOW); var response = controller.Edit(1) as ViewResult; Assert.IsNotNull(response.Model); var model = response.Model as OrdersEditViewModel; Assert.AreEqual(model.Order.Id, 1); }