12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using Microsoft.Extensions.Logging;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System.Threading.Tasks;
- using XYY.Service.Standard.ChannelApi.Winit.LMAApi;
- using XYY.Model.Standard.Order;
- using XYY.Model.Standard.Channel;
- using System.IO;
- namespace XYY.Test
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public async Task TestMethod1()
- {
- //LMAApi api = new LMAApi(null);
- // await api.GetData();
- // var order = new Order_Order
- // {
- // ReceiverStreet = "26767 Paddington Court",
- // ReceiverCity = "Murrieta",
- // ReceiverCountryCode = "US",
- // ReceiverName = "Ruth Cepeda",
- // ReceiverPhone = "+8169778412",
- // SystemNo = "JFKTest03",
- // CustomerWeight = 440,
- // ReceiverState = "CA",
- // ReceiverZipCode = "92563",
- // CustomerOrderNo = "T0000001"
- // };
- // var goods = new System.Collections.Generic.List<Order_OrderGoods> {
- // new Order_OrderGoods{
- // CnName="Æ»¹ûÊÖ»ú12345",
- // DeclareFee=1,
- // DeclareCurrency="USD",
- // EnName="ihpone",
- // Quantity=1,
- // HsCode="3924100090"
- // }
- //};
- // var channel = new Logistics_Channel
- // {
- // SenderStreet = "JFK"
- // };
- // var result = await api.DataUpload(order, goods, channel);
- // var data = await api.DrawPdfLabel(result, channel, order, goods);
- // string basePath = System.AppContext.BaseDirectory;
- // string pdfPath = Path.Combine(basePath, "test.pdf");
- // File.WriteAllBytes(pdfPath, data);
- //System.Diagnostics.Process.Start(pdfPath);
- }
- }
- }
|