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.

57 lines
1.8 KiB

2 years ago
2 years ago
2 years ago
  1. using Shentun.Peis.Models;
  2. using Shentun.Peis.Sexs;
  3. using Shentun.Peis.SysParms;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using Volo.Abp.Domain.Repositories;
  10. using Volo.Abp.Uow;
  11. using Xunit;
  12. using Xunit.Abstractions;
  13. namespace Shentun.Peis
  14. {
  15. public class SysParmAppServiceTest : PeisApplicationTestBase
  16. {
  17. private readonly IRepository<SysParm> _repository;
  18. private readonly SysParmAppService _appService;
  19. private readonly ITestOutputHelper _output;
  20. private readonly IUnitOfWorkManager _unitOfWorkManager;
  21. public SysParmAppServiceTest(ITestOutputHelper testOutputHelper)
  22. {
  23. _output = testOutputHelper;
  24. _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
  25. _repository = GetRequiredService<IRepository<SysParm>>();
  26. _appService = GetRequiredService<SysParmAppService>();
  27. }
  28. [Fact]
  29. public async Task GetListInSysParmValueNameAsync()
  30. {
  31. using (var uow = _unitOfWorkManager.Begin())
  32. {
  33. var list = await _appService.GetListInSysParmValueNameAsync("doctor_check_rule");
  34. foreach (var item in list)
  35. {
  36. _output.WriteLine(item.DisplayName);
  37. }
  38. }
  39. }
  40. [Fact]
  41. public async Task GetSysParmValueListInSysParmAsync()
  42. {
  43. using (var uow = _unitOfWorkManager.Begin())
  44. {
  45. var item = await _appService.GetSysParmValueListInSysParmAsync(
  46. new Guid("3a11fe49-5719-0e9e-dd44-0c4aff0900b0"), "doctor_check_check_charge");
  47. _output.WriteLine(item.DisplayName+item.SysParmValueName + item.CreatorName + item.LastModifierName );
  48. }
  49. }
  50. }
  51. }