Exemplo n.º 1
0
        public void TestServiceVerifyOrder()
        {
            bool res = true;

            try
            {
                Client         client = new Client(publickey, privatekey, mode);
                PlaceOrderInfo order  = new PlaceOrderInfo(
                    "12",
                    "M4 C# SDK",
                    180,
                    "Eduardo Aguilar",
                    "*****@*****.**"
                    );
                NewOrderInfo neworder = client.api.placeOrder(order);
                CpOrderInfo  response = client.api.verifyOrder(neworder.getId());
                res = !response.getId().Equals(null);
            }
            catch (Exception e)
            {
                res = false;
            }

            Assert.IsTrue(res);
        }
Exemplo n.º 2
0
        public void TestServiceSms()
        {
            bool res = true;

            try
            {
                Client         client = new Client(publickey, privatekey, mode);
                PlaceOrderInfo order  = new PlaceOrderInfo(
                    "12",
                    "M4 C# SDK",
                    180,
                    "Eduardo Aguilar",
                    "*****@*****.**"
                    );
                NewOrderInfo neworder = client.api.placeOrder(order);
                SmsInfo      response = client.api.sendSmsInstructions(phone_number, neworder.getId());
                res = !response.getType().Equals("");
            }
            catch (Exception e)
            {
                res = false;
            }

            Assert.IsTrue(res);
        }
Exemplo n.º 3
0
        public void TestServicePlaceOrderFarmaciaABC()
        {
            bool res = true;

            try
            {
                Client         client = new Client(publickey, privatekey, mode);
                PlaceOrderInfo order  = new PlaceOrderInfo(
                    "12",
                    "M4 C# SDK",
                    180,
                    "Eduardo Aguilar",
                    "*****@*****.**",
                    "FARMACIA_ABC"
                    );
                NewOrderInfo neworder = client.api.placeOrder(order);
                res = !neworder.getId().Equals(null);
            }
            catch (Exception e)
            {
                res = false;
            }

            Assert.IsTrue(res);
        }