Beispiel #1
0
        public void GetShipDetailTest()
        {
            var request = new ShippingDetailRequest()
            {
                LabelId = 765361
            };
            var result = PostponyApiService.GetShipDetail(request);

            Assert.AreEqual(result.Sucess, true);
        }
Beispiel #2
0
 public void ShipTest()
 {
     try
     {
         var result = PostponyApiService.Ship(CreateShipRequest());
         Assert.AreEqual(result.Sucess, true);
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #3
0
 public void GetRateTest()
 {
     try
     {
         var request = CreateRateRequest();
         var result  = PostponyApiService.GetRate(request);
         Assert.AreEqual(result.Sucess, true);
         Assert.AreEqual(result.Fedex.Sucess, true);
         Assert.AreEqual(result.Ups.Sucess, true);
         Assert.AreEqual(result.Usps.Sucess, true);
         Assert.AreEqual(result.Dhl.Sucess, true);
     }
     catch (Exception ex)
     {
     }
 }
Beispiel #4
0
 public void GetLabelInfoTest()
 {
     try
     {
         var request = new LabelIdRequest()
         {
             OrderId = "L-21-2560666"
         };
         var result = PostponyApiService.GetLabelInfo(request);
         Assert.AreEqual(result.Sucess, true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Beispiel #5
0
 public void DownloadingTest()
 {
     try
     {
         var request = new DownloadRequest()
         {
             LabelId = 758631, LabelFormatType = LabelFormatEnum.PDF.ToString()
         };
         var result = PostponyApiService.Downloading(request);
         Assert.AreEqual(result.Sucess, true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Beispiel #6
0
 public void GetTrackingTest()
 {
     try
     {
         var request = new TrackingRequest()
         {
             TrackNo       = "9400110205425007474346",
             LogisticsCode = ShippingClassEnum.Usps.ToString()
         };
         var result = PostponyApiService.GetTracking(request);
         Assert.AreEqual(result.Sucess, true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Beispiel #7
0
 public void BatchDownloadTest()
 {
     try
     {
         var request = new BatchDownloadRequest()
         {
             LabelIds = new List <int>()
             {
                 758631, 758645
             }
         };
         var result = PostponyApiService.BatchDownload(request);
         Assert.AreEqual(result.Sucess, true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }