コード例 #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)
            {
            }
        }
コード例 #2
0
        public void TestCRUD()
        {
            CarrierAccount account = CarrierAccount.Create(new Dictionary <string, object>()
            {
                { "type", "EndiciaAccount" },
                { "description", "description" }
            });

            Assert.IsNotNull(account.id);

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

            account.Destroy();
        }