/// <summary> /// create a product bundle and check if the creation was successful /// </summary> public void testCreate() { Console.WriteLine("ProductBundleTest: testCreate"); TBundledProduct bundledProduct = new TBundledProduct(); bundledProduct.Path = bundled_product; bundledProduct.Position = "10"; bundledProduct.Quantity = 3; TBundledProduct bundledProduct2 = new TBundledProduct(); bundledProduct2.Path = bundled_product2; bundledProduct2.Position = "20"; bundledProduct2.Quantity = 1; TBundledProduct[] bundledProducts = new TBundledProduct[] { bundledProduct, bundledProduct2 }; TCreate_Input productBundle = new TCreate_Input(); productBundle.Product = product; productBundle.BundledProducts = bundledProducts; TCreate_Input[] productBundles = new TCreate_Input[]{productBundle}; TCreate_Return[] productBundles_out = productBundleService.create(productBundles); // test if creation was successful Assert.AreEqual(1, productBundles_out.GetLength(0), "create result count"); TCreate_Return productBundle_out = productBundles_out[0]; Assert.IsNull(productBundle_out.Error, "create: no error"); Assert.IsTrue(productBundle_out.created, "created?"); Assert.AreEqual(product, productBundle_out.Product, "Product path"); }
/// <remarks/> public System.IAsyncResult Begincreate(TCreate_Input[] ProductBundles, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("create", new object[] { ProductBundles}, callback, asyncState); }
public TCreate_Return[] create(TCreate_Input[] ProductBundles) { object[] results = this.Invoke("create", new object[] { ProductBundles}); return ((TCreate_Return[])(results[0])); }