Skip to content

Commit 6bf0c98

Browse files
committed
feat: add TotalItemsFetched to CartResult and AverageRating to ProductResult
1 parent 9c953ef commit 6bf0c98

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Tests/Shared/Utils/Utils.Cart.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public static CartResult CreateCartResult(int i = 1)
2222
var totalPrice = cartItemResults.Sum(x => x.Product.PriceValueInCents * x.Quantity);
2323
return new CartResult
2424
{
25+
TotalItemsFetched = i,
2526
Items = CartItem.CreateCartItemResults(i),
2627
TotalItems = i,
2728
TotalPrice = totalPrice,

Tests/Shared/Utils/Utils.Product.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ Ecommerce.Domain.ProductAggregate.Product product
126126
{
127127
return new ProductResult
128128
{
129+
AverageRating = 0,
130+
SellerId = product.SellerId,
129131
ProductId = product.Id.Value.ToString(),
130132
ProductName = product.Name.Value,
131133
Slug = product.Slug,

0 commit comments

Comments
 (0)