예제 #1
0
        public void do_nothing_when_a_product_is_added_and_then_removed_twice()
        {
            var repository = new InMemoryCartRepository();

            var id = Guid.NewGuid().ToString();

            repository.AddProduct(id, "product1");
            repository.RemoveProduct(id, "product1");


            var cart = repository.Get(id);


            Check.That(cart.Products).IsEmpty();
        }
예제 #2
0
        public void do_nothing_when_trying_to_remove_a_non_added_product()
        {
            var repository = new InMemoryCartRepository();

            var id = Guid.NewGuid().ToString();


            repository.RemoveProduct(id, "product1");


            var cart = repository.Get(id);


            Check.That(cart.Products).IsEmpty();
        }
예제 #3
0
        public void Removing_An_Non_Added_Product_Does_Nothing()
        {
            var repository = new InMemoryCartRepository();

            var id = Guid.NewGuid().ToString();


            repository.RemoveProduct(id, "product1");


            var cart = repository.Get(id);


            Check.That(cart.Products).IsEmpty();
        }