Ejemplo n.º 1
0
        public void HappyPath()
        {
            var cartId  = CartId.NewCartId("some-gold-cart");
            var storage = new SpyStorage();

            App.ApplyDiscount(cartId, storage);

            var expected = new Cart(
                CartId.NewCartId("some-gold-cart"),
                CustomerId.NewCustomerId("gold-customer"),
                Amount.NewAmount(50));

            Assert.Equal(expected, storage.Saved);
        }