Beispiel #1
0
 public void Init()
 {
     i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     stock_list  = new Stock();
     stock_list.AddStockItem(i1.StockCode, i1);
     stock_control = new StockControl(stock_list);
 }
Beispiel #2
0
 public void Init()
 {
     i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     i3 = new StockItem ("BMAC56780", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     i4 = new StockItem ("BMAC56770", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     stock_list  = new Stock();
     stock_list.AddStockItem(i1.StockCode, i1);
     stock_list.AddStockItem(i3.StockCode, i3);
     stock_list.AddStockItem(i4.StockCode, i4);
 }
Beispiel #3
0
 public void Init()
 {
     i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     stock_list  = new Stock();
     stock_list.AddStockItem(i1.StockCode, i1);
     order_history = new OrderHistory();
     DateTime timestamp = DateTime.Now;
     o1 = new Order (timestamp, i1.StockCode, i1.Supplier, 10, 10);
     order_history.AddOrder (o1);
 }
Beispiel #4
0
 public void Init()
 {
     i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     o1 = new Order (timestamp, i1.StockCode, i1.Supplier, 10, 10);
 }
Beispiel #5
0
 public void TestIllegalValues()
 {
     StockItem i2 = new StockItem ("56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     Assert.AreEqual("Stock Code must begin with BMAC.",i2);
 }
Beispiel #6
0
 public void Init()
 {
     i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
 }
Beispiel #7
0
 public void TestUpdate()
 {
     String id = i3.StockCode;
     stock_list.UpdateStockItem(id, i3 = new StockItem ("BMAC56780", "Propelling Pencil", "Supply King", "1.49", "10", "20"));
     Assert.AreEqual("Supply King", i3.Supplier);
 }
Beispiel #8
0
 public void TestItemSkipped()
 {
     i2 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
     stock_list.AddStockItem(i2.StockCode, i2);
     Assert.AreEqual("the item with the id " + i2.StockCode + " already exists in the stock list and will be skipped",i2);
 }