public void MissingCart() { var cartId = new CartId("missing-cart"); var storage = new SpyStorage(); App.ApplyDiscount(cartId, storage); Assert.Null(storage.Saved); }
public void NoDiscount() { var cartId = new CartId("some-normal-cart"); var storage = new SpyStorage(); App.ApplyDiscount(cartId, storage); Assert.Null(storage.Saved); }
public void HappyPath() { var cartId = new CartId("some-gold-cart"); var storage = new SpyStorage(); App.ApplyDiscount(cartId, storage); var expected = new Cart(new CartId("some-gold-cart"), new CustomerId("gold-customer"), new Amount(50)); Assert.Equal(expected, storage.Saved); }