/// <summary> /// test setScalePrices for a Product and a PriceList and check if method returns a true value /// </summary> public void setScalePrices() { TSetScalePrices_Input scalePriceInput = new TSetScalePrices_Input(); scalePriceInput.Product = product; scalePriceInput.PriceList = pricelist; scalePriceInput.ScalePrices = scalePrices; TSetScalePrices_Input[] PriceListAssignments = new TSetScalePrices_Input[] { scalePriceInput }; ArrayList PriceListAssignments_out = serviceClient.setScalePrices(PriceListAssignments); // test if creation was successful Assert.AreEqual(1, PriceListAssignments_out.Count, "create result set"); TSetScalePrices_Return PriceListAssignment_out = (TSetScalePrices_Return)PriceListAssignments_out.ToArray()[0]; Assert.AreEqual(product, PriceListAssignment_out.Product, "product path"); Assert.AreEqual(true, PriceListAssignment_out.updated, "updated?"); }
/// <summary> /// use stub to create a ScalePrices via web services /// </summary> /// <param name="PriceListAssignments">Array of TSetScalePrices_Input</param> /// <returns>ArrayList of TSetScalePrices_Return</returns> public ArrayList setScalePrices(TSetScalePrices_Input[] PriceListAssignments) { TSetScalePrices_Return[] PriceListAssignments_out = stub.setScalePrices(PriceListAssignments); ArrayList result = new ArrayList(); for (int i = 0; i < PriceListAssignments_out.Length; i++) { TSetScalePrices_Return PriceListAssignment_out = PriceListAssignments_out[i]; if (PriceListAssignment_out.Error == null) { Console.WriteLine("successfully created ScalePrices for Product: " + PriceListAssignment_out.Product); result.Add(PriceListAssignment_out); } else { Console.WriteLine("an error occured (Epages Error):\n" + PriceListAssignment_out.Error.Message); } } return(result); }