Skip to content

Commit c5571d3

Browse files
try again
1 parent 78539c8 commit c5571d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ASP.Net Core API Gateway - 01/Composition.Tests/When_calling_composition_gateway.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ HttpClient ClientProvider(string name) =>
8080
Assert.Equal("Banana Holder", composedViewModel.ProductName);
8181
Assert.Equal("Outdoor travel cute banana protector storage box", composedViewModel.ProductDescription);
8282
Assert.Equal(10, composedViewModel.ProductPrice);
83-
Assert.Equal(4, composedViewModel.ProductInventory);
83+
Assert.Equal(4, (int)composedViewModel.ProductInventory);
8484
Assert.Equal(false, composedViewModel.ProductOutOfStock);
8585
Assert.Equal("Express Delivery, Regular mail", composedViewModel.ProductShippingOptions);
8686
}

ASP.Net Core API Gateway - 01/Warehouse.ViewModelComposition/CompositionHandlers/ProductDetailsCompositionHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public async Task Get(string id)
1818
dynamic stockItem = await response.Content.AsExpando();
1919

2020
dynamic vm = httpContextAccessor.HttpContext.Request.GetComposedResponseModel();
21-
vm.ProductInventory = (int)stockItem.Inventory;
21+
vm.ProductInventory = stockItem.Inventory;
2222
vm.ProductOutOfStock = stockItem.Inventory == 0;
2323
}
2424
}

0 commit comments

Comments
 (0)