/// <summary> /// test update of a PriceList and check if method returns a true value /// </summary> public void update() { TUpdate_Input[] PriceLists = new TUpdate_Input[] { PriceList_update }; ArrayList PriceLists_out = serviceClient.update(PriceLists); // test if update was successful Assert.AreEqual(1, PriceLists_out.Count, "update result set"); TUpdate_Return PriceList_out = (TUpdate_Return)PriceLists_out.ToArray()[0]; Assert.AreEqual(path + alias, PriceList_out.Path, "PriceList path"); Assert.AreEqual(true, PriceList_out.updated, "updated?"); }
/// <summary> /// test update of a customer and check if method returns a true value /// </summary> public void update() { TUpdate_Input[] customers = new TUpdate_Input[] { customer_update }; ArrayList customers_out = serviceClient.update(customers); // test if update was successful Assert.AreEqual(1, customers_out.Count, "update result set"); TUpdate_Return customer_out = (TUpdate_Return)customers_out.ToArray()[0]; Assert.AreEqual(path + alias, customer_out.Path, "customer path"); Assert.AreEqual(true, customer_out.updated, "updated?"); }
/// <summary> /// test update of a customer group and check if method returns a true value /// </summary> public void testUpdate() { TUpdate_Input[] groups = new TUpdate_Input[] { group_up }; TUpdate_Return[] groups_out = customerGroupService.update(groups); // test if creation was successful Assert.AreEqual(1, groups_out.Length, "update result set"); TUpdate_Return group_out = groups_out[0]; Assert.AreEqual(alias, group_out.Alias, "customer alias"); Assert.AreEqual(true, group_out.updated, "updated?"); }
private ArrayList updateStockLevels(int newVal) { List <TUpdate_Input> updates = new List <TUpdate_Input>(); foreach (string path in productPaths) { TUpdate_Input update = new TUpdate_Input(); update.Path = path; update.StockLevel = newVal; update.StockLevelSpecified = true; updates.Add(update); } return(productServiceClient.update(updates.ToArray())); }
private ArrayList updateContent() { List <TUpdate_Input> updates = new List <TUpdate_Input>(); TUpdate_Input update = new TUpdate_Input(); update.Path = productPaths[0]; TLocalizedValue name = new TLocalizedValue(); name.LanguageCode = "de"; name.Value = "Updated DotNetTestProduct " + productPaths[0]; update.Name = new TLocalizedValue[] { name }; updates.Add(update); return(productServiceClient.update(updates.ToArray())); }
/// <summary> /// test update /// </summary> public void testUpdate() { Console.WriteLine("ProductTypeTest: testUpdate start"); TUpdate_Input update1 = new TUpdate_Input(); update1.Path = NET_TEST1_PATH; update1.LayoutContentBundles = "BundlesTable"; TLocalizedValue name1_de = new TLocalizedValue(); name1_de.LanguageCode = "de"; name1_de.Value = NET_TEST1_NAME_DE + "updated"; update1.Name = new TLocalizedValue[] { name1_de }; TUpdate_Return[] productTypes = productTypeService.update(new TUpdate_Input[] { update1 }); Assert.AreEqual(1, productTypes.Length); Assert.AreEqual(NET_TEST1_PATH, productTypes[0].Path); Assert.IsNull(productTypes[0].Error); Assert.IsTrue(productTypes[0].updated); TGetInfo_Return[] result = productTypeService.getInfo( new String[] { NET_TEST1_PATH }, new String[] { }, new String[] { "de", "en" }); Assert.AreEqual(1, result.Length); Assert.AreEqual(NET_TEST1_PATH, result[0].Path); Assert.IsNull(result[0].Error); Assert.AreEqual(NET_TEST1_ALIAS, result[0].Alias); Assert.AreEqual("BundlesTable", result[0].LayoutContentBundles); TLocalizedValue[] names = result[0].Name; Assert.AreEqual(2, names.Length); Assert.AreEqual("de", names[0].LanguageCode); Assert.AreEqual(NET_TEST1_NAME_DE + "updated", names[0].Value); Assert.AreEqual("en", names[1].LanguageCode); Assert.AreEqual(NET_TEST1_NAME_EN, names[1].Value); Console.WriteLine("ProductTypeTest: testUpdate end"); }
/// <summary> /// update a cross selling and check if the update was successful /// </summary> public void testUpdate() { Console.WriteLine("CrossSellingTest: testUpdate"); // update a CrossSelling TUpdate_Input crossSelling = new TUpdate_Input(); crossSelling.Product = product; crossSelling.TargetProduct = target_product; crossSelling.Type = "CrossSelling"; crossSelling.Position = "20"; crossSelling.Comment = Comment2; TUpdate_Input[] CrossSellings = new TUpdate_Input[] { crossSelling }; TUpdate_Return[] CrossSellings_out = crossSellingService.update(CrossSellings); // test if update was successful Assert.AreEqual(1, CrossSellings_out.GetLength(0), "insert result count"); TUpdate_Return CrossSelling_out = CrossSellings_out[0]; Assert.IsNull(CrossSelling_out.Error, "insert: no error"); Assert.IsTrue(CrossSelling_out.updated, "updated?"); Assert.AreEqual(product, CrossSelling_out.Product, "Product path"); Assert.AreEqual("CrossSelling", CrossSelling_out.Type, "CrossSelling type"); }