Esempio n. 1
0
        public void ItemQuantityReadAdd_UT1()
        {
            StockManager       stockMgr       = new StockManager();
            TransactionManager transactoinMgr = new TransactionManager();
            Employee_UI        empUI          = new Employee_UI(stockMgr, transactoinMgr);

            empUI.AddToStock(1, "Pen", 50, 720, DateTime.Now);
            Assert.AreEqual(50, stockMgr.FindStock(1).Quantity);
        }
Esempio n. 2
0
        public void ItemQuantityBoundary_UT4()
        {
            StockManager       stockMgr       = new StockManager();
            TransactionManager transactoinMgr = new TransactionManager();
            Employee_UI        empUI          = new Employee_UI(stockMgr, transactoinMgr);

            empUI.AddToStock(1, "Pen", 1, Convert.ToDecimal(7.4), DateTime.Now);
            Assert.AreEqual(1, stockMgr.FindStock(1).Quantity);
        }
Esempio n. 3
0
        public void ItemQuantityReadRemove_UT2()
        {
            StockManager       stockMgr       = new StockManager();
            TransactionManager transactoinMgr = new TransactionManager();
            Employee_UI        empUI          = new Employee_UI(stockMgr, transactoinMgr);

            empUI.AddToStock(1, "Pen", 50, 720, DateTime.Now);
            empUI.TakeFromStock(1, 20, "Euan Martin".ToLower(), DateTime.Now);
            Assert.AreEqual(20, 50 - stockMgr.FindStock(1).Quantity);
        }