This commit is contained in:
Loretta 2025-10-19 13:58:38 +02:00
parent ebd3acd060
commit aa8f9e21d2
1 changed files with 2 additions and 4 deletions

View File

@ -171,13 +171,11 @@ namespace FruitBankHybrid.Shared.Tests
private async Task ValidateProductValues(Dictionary<int, List<ShippingItem>> shippingItemsByProductId)
{
foreach (var kvPair in shippingItemsByProductId)
foreach (var (key, shippingItems) in shippingItemsByProductId)
{
var shippingItems = kvPair.Value;
var productDto = await _signalRClient.GetProductDtoById(kvPair.Key);
var productDto = await _signalRClient.GetProductDtoById(key);
Assert.IsNotNull(productDto);
Assert.IsTrue(shippingItems.Where(si => si.ProductId == productDto.Id).All(si => si.ProductDto!.StockQuantity == productDto.StockQuantity));
var shippingItemSumQnty = shippingItems.Where(x => x.IsMeasured && x.ProductId == productDto.Id).Sum(x => x.MeasuredQuantity);