예제 #1
0
        public void TestShipments()
        {
            var addresses = _client.GetAddresses();
            var parcels   = _client.GetParcels();

            var shipment = _client.CreateShipment(new Shipment
            {
                Parcel      = parcels[0],
                FromAddress = addresses[0],
                ToAddress   = addresses[1],
            });

            Assert.IsNotNull(shipment.Id);

            var sameAsShipment = _client.GetShipment(shipment.Id);

            Assert.AreEqual(shipment.Id, sameAsShipment.Id);

            var rates = _client.GetShipmentRates(shipment.Id);

            Assert.AreEqual(rates.Count, shipment.Rates.Count);
        }