Beispiel #1
0
        public void GetShoppingCartWithCustomerId_Test()
        {
            int customerId = currentCustomerId;

            IShoppingCartManager manager = ServiceProvider.GetService <IShoppingCartManager>();

            var shoppingCart = manager.GetShoppingCartByCustomerId(customerId);

            Assert.IsNotNull(shoppingCart);
        }
Beispiel #2
0
        public void GetShoppingCartWithCustomerIdIsZero_Test()
        {
            int customerId = 0;

            IShoppingCartManager manager = ServiceProvider.GetService <IShoppingCartManager>();

            Assert.ThrowsException <GetShoppingCartByCustomerIdException>(() =>
            {
                manager.GetShoppingCartByCustomerId(customerId);
            });
        }