Exemplo n.º 1
0
        /// <summary>
        /// test update of a Product and check if method returns a true value
        /// </summary>
        public void update()
        {
            TUpdate_Input[] Products = new TUpdate_Input[] { Product_update };

            ArrayList Products_out = serviceClient.update(Products);

            // test if update was successful
            Assert.AreEqual(1, Products_out.Count, "udpated result set");

            TUpdate_Return Product_out = (TUpdate_Return)Products_out.ToArray()[0];

            Assert.AreEqual(path + alias, Product_out.Path, "product path");
            Assert.AreEqual(true, Product_out.updated, "updated?");
        }
Exemplo n.º 2
0
        /// <summary>
        /// test update of a Catalog and check if method returns a true value
        /// </summary>
        public void update()
        {
            TUpdate_Input[] Catalogs = new TUpdate_Input[] { Catalog_update };

            ArrayList Catalogs_out = serviceClient.update(Catalogs);

            // test if update was successful
            Assert.AreEqual(1, Catalogs_out.Count, "update result set");

            TUpdate_Return Catalog_out = (TUpdate_Return)Catalogs_out.ToArray()[0];

            Assert.AreEqual(full, Catalog_out.Path, "Catalog path");
            Assert.AreEqual(true, Catalog_out.updated, "updated?");
        }
Exemplo n.º 3
0
        /// <summary>
        /// test update of a Order and check if method returns a true value
        /// </summary>
        public void update()
        {
            TUpdate_Input[] Orders = new TUpdate_Input[] { Order_update };

            ArrayList Orders_out = serviceClient.update(Orders);

            // test if update was successful
            Assert.AreEqual(1, Orders_out.Count, "update result set");

            TUpdate_Return Order_out = (TUpdate_Return)Orders_out.ToArray()[0];

            Assert.AreEqual(path + alias, Order_out.Path, "Order path");
            Assert.AreEqual(true, Order_out.updated, "updated?");
        }
Exemplo n.º 4
0
        /// <summary>
        /// test update of a customer group and check if method returns a true value
        /// </summary>
        public void testUpdate()
        {
            TUpdate_Input[] groups = new TUpdate_Input[] { group_up };

            TUpdate_Return[] groups_out = customerGroupService.update(groups);

            // test if creation was successful
            Assert.AreEqual(1, groups_out.Length, "update result set");

            TUpdate_Return group_out = groups_out[0];

            Assert.AreEqual(alias, group_out.Alias, "customer alias");
            Assert.AreEqual(true, group_out.updated, "updated?");
        }
Exemplo n.º 5
0
        /// <summary>
        /// use stub to create a Order via web services
        /// </summary>
        /// <param name="Orders">Array of TUpdate_Input</param>
        /// <returns>ArrayList of TUpdate_Return</returns>
        public ArrayList update(TUpdate_Input[] Orders)
        {
            TUpdate_Return[] Orders_out = stub.update(Orders);

            ArrayList result = new ArrayList();

            for (int i = 0; i < Orders_out.Length; i++)
            {
                TUpdate_Return Order_out = Orders_out[i];

                if (Order_out.Error == null)
                {
                    Console.WriteLine("successfully updated Order: " + Order_out.Path);
                    result.Add(Order_out);
                }
                else
                {
                    Console.WriteLine("an error occured (Epages Error):\n" + Order_out.Error.Message);
                }
            }

            return(result);
        }
Exemplo n.º 6
0
        /// <summary>
        /// use stub to create a Product via web services
        /// </summary>
        /// <param name="Products">Array of TUpdate_Input</param>
        /// <returns>ArrayList of TUpdate_Return</returns>
        public ArrayList update(TUpdate_Input[] Products)
        {
            TUpdate_Return[] Products_out = stub.update(Products);

            ArrayList result = new ArrayList();

            for (int i = 0; i < Products_out.Length; i++)
            {
                TUpdate_Return Product_out = Products_out[i];

                if (Product_out.Error == null)
                {
                    Console.WriteLine("successfully updated Product: " + Product_out.Path);
                    result.Add(Product_out);
                }
                else
                {
                    Console.WriteLine("an error occured (Epages Error):\n" + Product_out.Error.Message);
                }
            }

            return(result);
        }
Exemplo n.º 7
0
        /// <summary>
        /// use stub to create a Catalog via web services
        /// </summary>
        /// <param name="Catalogs">Array of TUpdate_Input</param>
        /// <returns>ArrayList of TUpdate_Return</returns>
        public ArrayList update(TUpdate_Input[] Catalogs)
        {
            TUpdate_Return[] Catalogs_out = stub.update(Catalogs);

            ArrayList result = new ArrayList();

            for (int i = 0; i < Catalogs_out.Length; i++)
            {
                TUpdate_Return Catalog_out = Catalogs_out[i];

                if (Catalog_out.Error == null)
                {
                    Console.WriteLine("successfully updated Catalog: " + Catalog_out.Path);
                    result.Add(Catalog_out);
                }
                else
                {
                    Console.WriteLine("an error occured (Epages Error):\n" + Catalog_out.Error.Message);
                }
            }

            return(result);
        }
Exemplo n.º 8
0
        /// <summary>
        /// update a cross selling and check if the update was successful
        /// </summary>
        public void testUpdate()
        {
            Console.WriteLine("CrossSellingTest: testUpdate");

            // update a CrossSelling
            TUpdate_Input crossSelling = new TUpdate_Input();

            crossSelling.Product       = product;
            crossSelling.TargetProduct = target_product;
            crossSelling.Type          = "CrossSelling";
            crossSelling.Position      = "20";
            crossSelling.Comment       = Comment2;
            TUpdate_Input[]  CrossSellings     = new TUpdate_Input[] { crossSelling };
            TUpdate_Return[] CrossSellings_out = crossSellingService.update(CrossSellings);

            // test if update was successful
            Assert.AreEqual(1, CrossSellings_out.GetLength(0), "insert result count");
            TUpdate_Return CrossSelling_out = CrossSellings_out[0];

            Assert.IsNull(CrossSelling_out.Error, "insert: no error");
            Assert.IsTrue(CrossSelling_out.updated, "updated?");
            Assert.AreEqual(product, CrossSelling_out.Product, "Product path");
            Assert.AreEqual("CrossSelling", CrossSelling_out.Type, "CrossSelling type");
        }