示例#1
0
        public JsonResult _CreateShipmentLabel(string orderId)
        {
            var shipstationService     = new ShipStationService();
            var base64ResultStringTask = shipstationService.CreateShipmentLabel(orderId);

            base64ResultStringTask.Wait();

            return(Json(new { base64ResultString = base64ResultStringTask.Result }, JsonRequestBehavior.AllowGet));
        }
        //[TestMethod]
        public void ShouldCreateShipmentLabelByOrderNumber()
        {
            // Arrange
            var           shippingStationOrder = new ShipStationService();
            Task <string> result_task;
            string        result      = "";
            var           orderNumber = "112-7461785-3785061";

            //Act
            result_task = shippingStationOrder.CreateShipmentLabel(orderNumber);

            result_task.Wait();

            result = result_task.Result;

            //Assert
            //Assert.IsTrue(result != "");
        }
示例#3
0
 public async Task <string> CreateShipmentLabelByOrderNumber(string orderNumber)
 {
     return(await _shipStationService.CreateShipmentLabel(orderNumber));
 }