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.

63 lines
1.9 KiB

2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. using Microsoft.Extensions.Configuration;
  2. using NPOI.OpenXmlFormats.Dml;
  3. using Shentun.Peis.PlugIns;
  4. using Shentun.Peis.PlugIns.ColumnReferences;
  5. using Shentun.Utilities;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using Xunit.Abstractions;
  12. namespace Shentun.Peis.PlugIns.Tests
  13. {
  14. public class ColumnReferencePlugInsTest
  15. {
  16. private readonly ITestOutputHelper _output;
  17. public ColumnReferencePlugInsTest(ITestOutputHelper testOutputHelper)
  18. {
  19. _output = testOutputHelper;
  20. }
  21. [Fact]
  22. public async Task GetCodeValues()
  23. {
  24. string configParm;
  25. string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
  26. configParm = File.ReadAllText(filePath);
  27. var columnReferencePlugInsBase = new ColumnReferencePlugInsBase(configParm);
  28. var items = await columnReferencePlugInsBase.GetAppCodeValuesAsync();
  29. foreach ( var item in items )
  30. {
  31. _output.WriteLine(item.CodeValue + item.DisplayName);
  32. }
  33. }
  34. [Fact]
  35. public async Task GetInterfaceCodeValues()
  36. {
  37. string configParm;
  38. string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
  39. configParm = File.ReadAllText(filePath);
  40. var columnReferencePlugInsBase = new ColumnReferencePlugInsDbBase(configParm);
  41. var items = await columnReferencePlugInsBase.GetInterfaceCodeValuesAsync();
  42. foreach (var item in items)
  43. {
  44. _output.WriteLine(item.CodeValue + item.DisplayName);
  45. }
  46. }
  47. [Fact]
  48. public void GetPYSimpleCode()
  49. {
  50. var simpleCode = LanguageConverter.GetPYSimpleCode("血常规5项");
  51. _output.WriteLine(simpleCode);
  52. }
  53. }
  54. }