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.
54 lines
1.7 KiB
54 lines
1.7 KiB
using Microsoft.Extensions.Configuration;
|
|
using NPOI.OpenXmlFormats.Dml;
|
|
using Shentun.Peis.ColumnReferencePlugIns;
|
|
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.ColumnReferencePlugIns.Tests
|
|
{
|
|
public class ColumnReferencePlugInsAsbitemBaseTest
|
|
{
|
|
private readonly ITestOutputHelper _output;
|
|
public ColumnReferencePlugInsAsbitemBaseTest(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.GetCodeValuesAsync();
|
|
foreach ( var item in items )
|
|
{
|
|
_output.WriteLine(item.Code + 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.Code + item.DisplayName);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|