public TInsertCrossSelling_Return[] insert(TInsertCrossSelling_Input[] CrossSellings) { object[] results = this.Invoke("insert", new object[] { CrossSellings}); return ((TInsertCrossSelling_Return[])(results[0])); }
/// <remarks/> public System.IAsyncResult Begininsert(TInsertCrossSelling_Input[] CrossSellings, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("insert", new object[] { CrossSellings}, callback, asyncState); }
/// <summary> /// insert a cross selling and check if the creation was successful /// </summary> public void testInsert() { Console.WriteLine("CrossSellingTest: testInsert"); // insert a CrossSelling, a ProductComparison and an Accessory product TInsertCrossSelling_Input crossSelling = new TInsertCrossSelling_Input(); crossSelling.Product = product; crossSelling.TargetProduct = target_product; crossSelling.Type = "CrossSelling"; crossSelling.Position = "10"; TInsertCrossSelling_Input productComparison = new TInsertCrossSelling_Input(); productComparison.Product = product; productComparison.TargetProduct = target_product; productComparison.Type = "ProductComparison"; productComparison.Position = "10"; TInsertCrossSelling_Input accessory = new TInsertCrossSelling_Input(); accessory.Product = product; accessory.TargetProduct = target_product; accessory.Type = "Accessory"; accessory.Position = "10"; TInsertCrossSelling_Input[] CrossSellings = new TInsertCrossSelling_Input[]{ crossSelling, productComparison, accessory, }; TInsertCrossSelling_Return[] CrossSellings_out = crossSellingService.insert(CrossSellings); // test if creation was successful Assert.AreEqual(3, CrossSellings_out.GetLength(0), "insert result count"); TInsertCrossSelling_Return CrossSelling_out = CrossSellings_out[0]; Assert.IsNull(CrossSelling_out.Error, "insert: no error"); Assert.IsTrue(CrossSelling_out.inserted, "assigned?"); Assert.AreEqual(product, CrossSelling_out.Product, "Product path"); Assert.AreEqual("CrossSelling", CrossSelling_out.Type, "CrossSelling type"); }