Beispiel #1
0
 public void testInit()
 {
     taxCalculatorObj = new TaxCalculator();
     biller           = new Biller(taxCalculatorObj);
     shoppingCartObj  = new ShoppingCart();
     storeShelf       = new StoreShelf();
 }
Beispiel #2
0
        public void SearchAndRetrieveItemFromShelfTest()
        {
            var objShelf = new StoreShelf();
            var product  = objShelf.SearchAndRetrieveItemFromShelf("book", 12.49M, false, 1);

            Assert.IsNotNull(product);
        }
        public void AddItemToCartTest()
        {
            var storeShelf   = new StoreShelf();
            var shoppingCart = new ShoppingCart();

            shoppingCart.AddItemToCart(storeShelf.SearchAndRetrieveItemFromShelf("book", 12.49M, false, 1));
            Assert.IsNotNull(shoppingCart.GetItemsFromCart());
        }
Beispiel #4
0
        public static StoreShelf CreateStoreShelf(string dataAreaId,
                                                  string storeNumber,
                                                  string sectionNumber,
                                                  string shelfNumber,
                                                  decimal sectionPercent,
                                                  global::Microsoft.Dynamics.DataEntities.RetailStore retailStore)
        {
            StoreShelf storeShelf = new StoreShelf();

            storeShelf.dataAreaId     = dataAreaId;
            storeShelf.StoreNumber    = storeNumber;
            storeShelf.SectionNumber  = sectionNumber;
            storeShelf.ShelfNumber    = shelfNumber;
            storeShelf.SectionPercent = sectionPercent;
            if ((retailStore == null))
            {
                throw new global::System.ArgumentNullException("retailStore");
            }
            storeShelf.RetailStore = retailStore;
            return(storeShelf);
        }