Ejemplo n.º 1
0
        public async Task TestValidRetrieve()
        {
            Manifest testObject = await ManifestTest.GetDefaultObject(await AddressTest.GetDefaultObject2());

            Manifest retrievedObject;

            retrievedObject = await shippoClient.RetrieveManifest(testObject.ObjectId);

            Assert.AreEqual(testObject.ObjectId, retrievedObject.ObjectId);
        }
Ejemplo n.º 2
0
        public void TestInvalidCreate()
        {
            var invalidAddressTo = new CreateAddress
            {
                Name       = "Undefault New Wu",
                Company    = "Shippo",
                StreetNo   = "215",
                Street1    = "Clayton St.",
                Street2    = null,
                City       = "Mickey Town",
                State      = "CA",
                PostalCode = "1183",
                Country    = "US",
                Phone      = "+1 555 9393",
                Email      = "*****@*****.**",
                Metadata   = "Customer ID 123456",
                Validate   = true
            };

            Assert.That(async() => await ManifestTest.GetDefaultObject(invalidAddressTo), Throws.TypeOf <ShippoException>());
        }