Beispiel #1
0
 /// <remarks/>
 public System.IAsyncResult Begincreate(TCreate_Input[] CrossSellings, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("create", 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
			TCreate_Input crossSelling = new TCreate_Input();
			crossSelling.Product	= product;
			crossSelling.TargetProduct = target_product;
			crossSelling.Type = "CrossSelling";
			crossSelling.Position = "10";
			crossSelling.Comment = Comment1;

			TCreate_Input productComparison = new TCreate_Input();
			productComparison.Product	= product;
			productComparison.TargetProduct = target_product;
			productComparison.Type = "ProductComparison";
			productComparison.Position = "10";

			TCreate_Input accessory = new TCreate_Input();
			accessory.Product	= product;
			accessory.TargetProduct = target_product;
			accessory.Type = "Accessory";
			accessory.Position = "10";

			TCreate_Input[] CrossSellings = new TCreate_Input[]{
				crossSelling,
				productComparison,
				accessory,
			};

			TCreate_Return[] CrossSellings_out = crossSellingService.create(CrossSellings);

			// test if creation was successful
			Assert.AreEqual(3, CrossSellings_out.GetLength(0), "insert result count");
			TCreate_Return	CrossSelling_out = CrossSellings_out[0];
			Assert.IsNull(CrossSelling_out.Error, "insert: no error");
			Assert.IsTrue(CrossSelling_out.created, "assigned?");
			Assert.AreEqual(product, CrossSelling_out.Product, "Product path");
			Assert.AreEqual("CrossSelling", CrossSelling_out.Type, "CrossSelling type");
		}
Beispiel #3
0
 public TCreate_Return[] create(TCreate_Input[] CrossSellings) {
     object[] results = this.Invoke("create", new object[] {
                 CrossSellings});
     return ((TCreate_Return[])(results[0]));
 }