fix
This commit is contained in:
parent
ebd3acd060
commit
aa8f9e21d2
|
|
@ -171,13 +171,11 @@ namespace FruitBankHybrid.Shared.Tests
|
||||||
|
|
||||||
private async Task ValidateProductValues(Dictionary<int, List<ShippingItem>> shippingItemsByProductId)
|
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(key);
|
||||||
var productDto = await _signalRClient.GetProductDtoById(kvPair.Key);
|
|
||||||
|
|
||||||
Assert.IsNotNull(productDto);
|
Assert.IsNotNull(productDto);
|
||||||
|
|
||||||
Assert.IsTrue(shippingItems.Where(si => si.ProductId == productDto.Id).All(si => si.ProductDto!.StockQuantity == productDto.StockQuantity));
|
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);
|
var shippingItemSumQnty = shippingItems.Where(x => x.IsMeasured && x.ProductId == productDto.Id).Sum(x => x.MeasuredQuantity);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue