private void AddServiceProduct() { _storageController.CreateServiceProduct(ServiceProduct.GetNextID(), Decimal.Parse(textbox_ServiceSalePrice.Text), Decimal.Parse(textbox_ServiceGroupPrice.Text), Int32.Parse(textbox_ServiceGroupLimit.Text), textbox_ServiceName.Text, _storageController.GroupDictionary.First(X => X.Value.Name == comboBox_ServiceGroup.Text).Key); }
public void CreateServiceProductStorageControllerTest() { int old_id = Product.GetNextID(); SC.CreateServiceProduct(old_id, 10m, 10m, 10, "TestProd", 1); int new_id = Product.GetNextID(); bool Identical = (SC.ServiceProductDictionary[old_id] == SC.AllProductsDictionary[old_id]); bool Rest = (new_id > old_id) && SC.ServiceProductDictionary.ContainsKey(old_id) && SC.AllProductsDictionary.ContainsKey(old_id); Assert.IsTrue(Identical && Rest); }