public async Task Production_GetProductsAsync() { // Arrange var controller = new ProductionController(AdventureWorksRepository); // Act var response = await controller.GetProducts() as ObjectResult; // Assert var value = response.Value as IListModelResponse <ProductViewModel>; Assert.False(value.DidError); }
public async Task GetProductsTestAsync() { // Arrange var productionBusinessObject = BusinessObjectMocker.GetProductionBusinessObject(); using (var controller = new ProductionController(null, productionBusinessObject)) { // Act var response = await controller.GetProducts() as ObjectResult; // Assert var value = response.Value as IListModelResponse <Product>; Assert.False(value.DidError); } }