DownloadDataAppServiceTests.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using OrBit.MESInterface.Application.Contracts.Interfaces;
  2. using Shouldly;
  3. using System.Threading.Tasks;
  4. using Xunit;
  5. namespace OrBit.MESInterface.Application.Tests.UnitTests
  6. {
  7. public class DownloadDataAppServiceTests : MESInterfaceApplicationTestBase
  8. {
  9. private readonly IDownloadDataAppService _downloadDataAppService;
  10. public DownloadDataAppServiceTests()
  11. {
  12. _downloadDataAppService = GetRequiredService<IDownloadDataAppService>();
  13. }
  14. [Fact]
  15. public async Task Should_DownloadData_By_Single()
  16. {
  17. // var result = await _downloadDataAppService.SingleInterfaceDownload("SAPDataDownload", "READ_MATERIAL", "");
  18. //result.ShouldContain("EX_LINES");
  19. //JObject jobj = JObject.Parse(resultjson);
  20. //JToken result = jobj as JToken;
  21. ////这里6.0版块可以用正则匹配
  22. //var node = result.SelectToken("$.." + "EX_LINES");
  23. //var value = "";
  24. //if (node != null)
  25. //{
  26. // //判断节点类型
  27. // if (node.Type == JTokenType.String || node.Type == JTokenType.Integer || node.Type == JTokenType.Float)
  28. // {
  29. // //返回string值
  30. // value = node.Value<object>().ToString();
  31. // }
  32. //}
  33. // result.ShouldNotBeNull();
  34. }
  35. }
  36. }