public void GetShipDetailTest() { var request = new ShippingDetailRequest() { LabelId = 765361 }; var result = PostponyApiService.GetShipDetail(request); Assert.AreEqual(result.Sucess, true); }
public void ShipTest() { try { var result = PostponyApiService.Ship(CreateShipRequest()); Assert.AreEqual(result.Sucess, true); } catch (Exception) { throw; } }
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) { } }
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; } }
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; } }
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; } }
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; } }