예제 #1
0
 public TExistsCrossSelling_Return[] exists(TExistsCrossSelling_Input[] CrossSellings) {
     object[] results = this.Invoke("exists", new object[] {
                 CrossSellings});
     return ((TExistsCrossSelling_Return[])(results[0]));
 }
예제 #2
0
 /// <remarks/>
 public System.IAsyncResult Beginexists(TExistsCrossSelling_Input[] CrossSellings, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("exists", new object[] {
                 CrossSellings}, callback, asyncState);
 }
예제 #3
0
		/// <summary>
		/// test exists method
		/// </summary>
		/// <param name="exists">if false, test is successful if the CrossSelling does NOT exists</param>
		public void testExists(bool expected)
		{
			Console.WriteLine("CrossSellingTest: testExists");

			// all cross selling types (Type=null)
			TExistsCrossSelling_Input CrossSelling_in = new TExistsCrossSelling_Input();
			CrossSelling_in.Product			= product;
			CrossSelling_in.TargetProduct	= target_product;
			TExistsCrossSelling_Input[] CrossSellings = new TExistsCrossSelling_Input[]{CrossSelling_in};

			TExistsCrossSelling_Return[] CrossSellings_out = crossSellingService.exists(CrossSellings);

			// test if exists check was successful
			Assert.AreEqual(1, CrossSellings_out.GetLength(0), "exists result count (only CrossSelling)");

			TExistsCrossSelling_Return	CrossSelling_out = CrossSellings_out[0];
			Assert.IsNull(CrossSelling_out.Error, "exists: no error");
			Assert.AreEqual(product, CrossSelling_out.Product,	"Product path");
			Assert.AreEqual(target_product,	CrossSelling_out.TargetProduct,	"Target product");
			Assert.AreEqual(expected, CrossSelling_out.exists, "exists?");

			// only Accessories
			CrossSelling_in = new TExistsCrossSelling_Input();
			CrossSelling_in.Product	= product;
			CrossSelling_in.TargetProduct = target_product;
			CrossSelling_in.Type = "Accessory";
			CrossSellings = new TExistsCrossSelling_Input[]{CrossSelling_in};

			CrossSellings_out = crossSellingService.exists(CrossSellings);
			
			Assert.AreEqual(1, CrossSellings_out.GetLength(0), "exists result count (only Accessories)");
			Assert.IsNull(CrossSelling_out.Error, "exists: no error");
			Assert.AreEqual(product, CrossSelling_out.Product,	"Product path");
			Assert.AreEqual(target_product,	CrossSelling_out.TargetProduct,	"Target product");
			Assert.AreEqual(expected, CrossSelling_out.exists, "exists?");
		}