using OrBit.MESInterface.Application.Contracts.Interfaces; using Shouldly; using System.Threading.Tasks; using Xunit; namespace OrBit.MESInterface.Application.Tests.UnitTests { public class DownloadDataAppServiceTests : MESInterfaceApplicationTestBase { private readonly IDownloadDataAppService _downloadDataAppService; public DownloadDataAppServiceTests() { _downloadDataAppService = GetRequiredService(); } [Fact] public async Task Should_DownloadData_By_Single() { // var result = await _downloadDataAppService.SingleInterfaceDownload("SAPDataDownload", "READ_MATERIAL", ""); //result.ShouldContain("EX_LINES"); //JObject jobj = JObject.Parse(resultjson); //JToken result = jobj as JToken; ////这里6.0版块可以用正则匹配 //var node = result.SelectToken("$.." + "EX_LINES"); //var value = ""; //if (node != null) //{ // //判断节点类型 // if (node.Type == JTokenType.String || node.Type == JTokenType.Integer || node.Type == JTokenType.Float) // { // //返回string值 // value = node.Value().ToString(); // } //} // result.ShouldNotBeNull(); } } }