Exemplo n.º 1
0
        public void Update_CartNotFound_DoNotFail()
        {
            var target = new FakeShoppingCartRepository(_databaseSettings);
            var cart1  = new CartBuilder().WithId(null).WithCustomerId("1").Build();

            target.Update(Invalid_ID, cart1);
        }
Exemplo n.º 2
0
        public void Update_CartFound_UpdateValue()
        {
            var target = new FakeShoppingCartRepository(_databaseSettings);
            var cart1  = new CartBuilder().WithId(null).WithCustomerId("1").Build();

            target.Create(cart1);
            cart1.CustomerId = "other";

            target.Update(cart1.Id, cart1);

            var result = target.FindById(cart1.Id);

            Assert.Equal("other", cart1.CustomerId);
        }