public void GetAll_catch_exception() { FoodsController controller = GetController(throwException); var result = controller.GetAll() as BadRequestObjectResult; var message = result.Value.GetType().Name; Assert.AreEqual(message, "Exception"); }
public void GetAll_return_all_categories() { FoodsController controller = GetController(doNotThrowException); var result = controller.GetAll() as OkObjectResult; var value = result.Value as FoodsResponse; Assert.AreEqual(value.Foods.Count, 2); }