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

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

            var shoppingCart = manager.GetShoppingCartByCustomerId(customerId);

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

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

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