You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

using Microsoft.Extensions.Configuration;
using NPOI.OpenXmlFormats.Dml;
using Shentun.Peis.PlugIns;
using Shentun.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit.Abstractions;
namespace Shentun.Peis.PlugIns.Tests
{
public class ColumnReferencePlugInsTest
{
private readonly ITestOutputHelper _output;
public ColumnReferencePlugInsTest(ITestOutputHelper testOutputHelper)
{
_output = testOutputHelper;
}
[Fact]
public async Task GetCodeValues()
{
string configParm;
string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
configParm = File.ReadAllText(filePath);
var columnReferencePlugInsBase = new ColumnReferencePlugInsBase(configParm);
var items = await columnReferencePlugInsBase.GetAppCodeValuesAsync();
foreach ( var item in items )
{
_output.WriteLine(item.CodeValue + item.DisplayName);
}
}
[Fact]
public async Task GetInterfaceCodeValues()
{
string configParm;
string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
configParm = File.ReadAllText(filePath);
var columnReferencePlugInsBase = new ColumnReferencePlugInsDbBase(configParm);
var items = await columnReferencePlugInsBase.GetInterfaceCodeValuesAsync();
foreach (var item in items)
{
_output.WriteLine(item.CodeValue + item.DisplayName);
}
}
[Fact]
public void GetPYSimpleCode()
{
var simpleCode = LanguageConverter.GetPYSimpleCode("血常规5项");
_output.WriteLine(simpleCode);
}
}
}