public void Initialize() { itemsInStock = new ProductStock(); menuItems = new Menu(); orders = new Orders(); ordersEmpty = new Orders(); var testProduct1 = new Product(1, "name1", 5, "kg", 0.3); var testProduct2 = new Product(2, "name2", 5, "kg", 0.3); var testProduct3 = new Product(3, "name3", 5, "kg", 0.3); var testProductIds = new List <int>(); testProductIds.Add(1); testProductIds.Add(2); testProductIds.Add(3); itemsInStock.addToStock(testProduct1); itemsInStock.addToStock(testProduct2); itemsInStock.addToStock(testProduct3); var testMenuItem = new MenuItem(1, "menuItem1", testProductIds); menuItems.addMenuItem(testMenuItem); }
public void Initialize() { itemsInStock = new ProductStock(); itemsInStockEmpty = new ProductStock(); var testProduct1 = new Product(1, "name1", 5, "kg", 0.3); var testProduct2 = new Product(2, "name2", 5, "kg", 0.3); var testProduct3 = new Product(3, "name3", 5, "kg", 0.3); itemsInStock.addToStock(testProduct1); itemsInStock.addToStock(testProduct2); itemsInStock.addToStock(testProduct3); }
public void addToStock_Test() { var product = new Product(5, "prod1", 10, "kg", 0.3); itemsInStock.addToStock(product); var available = itemsInStock.isAvailable(5); var productResult = itemsInStock.getProduct(5); Assert.AreEqual(product, productResult); Assert.AreEqual(available, true); }
public void addToStockTest([PexAssumeUnderTest] ProductStock target, Product product) { target.addToStock(product); // TODO: add assertions to method ProductStockTest.addToStockTest(ProductStock, Product) }