Commits

Bertrand Le Roy committed 1c475a2

Shopping cart items are added to the start, not to the end.

  • Participants
  • Parent commits 0fae428

Comments (0)

Files changed (2)

File Models/ShoppingCart.cs

                 item.Quantity += quantity;
             }
             else {
-                ItemsInternal.Add(new ShoppingCartItem(productId, quantity, attributeIdsToValues));
+                ItemsInternal.Insert(0, new ShoppingCartItem(productId, quantity, attributeIdsToValues));
             }
         }
 

File Nwazet.Commerce.Tests/PriceProviderTests.cs

         private static readonly IClock Now = new FakeClock(new DateTime(2012, 11, 24, 12, 0, 0, DateTimeKind.Utc));
 
         private static void FillCart(IShoppingCart cart) {
-            cart.AddRange(OriginalQuantities
+            cart.AddRange(OriginalQuantities.Reverse()
                 .Select(q => new ShoppingCartItem(q.Product.Id, q.Quantity)));
         }