Ejemplo n.º 1
0
        public void TestCRUD()
        {
            CarrierAccount account = CarrierAccount.Create(new Dictionary <string, object>
            {
                {
                    "type", "DhlExpressAccount"
                },
                {
                    "description", "description"
                }
            });

            Assert.IsNotNull(account.id);
            Assert.AreEqual(account.type, "DhlExpressAccount");

            account.Update(new Dictionary <string, object>
            {
                {
                    "reference", "new-reference"
                }
            });
            Assert.AreEqual("new-reference", account.reference);

            account.Destroy();
            try
            {
                CarrierAccount.Retrieve(account.id);
                Assert.Fail();
            }
            catch (HttpException)
            {
            }
        }
Ejemplo n.º 2
0
        public void TestRetrieve()
        {
            CarrierAccount account = CarrierAccount.Retrieve("ca_7642d249fdcf47bcb5da9ea34c96dfcf");

            Assert.AreEqual("ca_7642d249fdcf47bcb5da9ea34c96dfcf", account.id);
        }
Ejemplo n.º 3
0
        public void TestRetrieve()
        {
            CarrierAccount account = CarrierAccount.Retrieve("ca_7c7X1XzO");

            Assert.AreEqual("ca_7c7X1XzO", account.id);
        }