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.

56 lines
1.6 KiB

11 months ago
11 months ago
  1. using Shentun.Pacs.GuideTypes;
  2. using Shentun.Pacs.Models;
  3. using Shentun.Pacs.Patients;
  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.Application.Dtos;
  10. using Volo.Abp.Domain.Repositories;
  11. using Volo.Abp.Uow;
  12. using Xunit;
  13. using Xunit.Abstractions;
  14. namespace Shentun.Pacs
  15. {
  16. public class PatientAppServiceTest : PeisApplicationTestBase
  17. {
  18. private readonly IRepository<Patient, Guid> _repository;
  19. private readonly PatientAppService _appService;
  20. private readonly ITestOutputHelper _output;
  21. private readonly IUnitOfWorkManager _unitOfWorkManager;
  22. public PatientAppServiceTest(ITestOutputHelper testOutputHelper)
  23. {
  24. _output = testOutputHelper;
  25. _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
  26. _repository = GetRequiredService<IRepository<Patient, Guid>>();
  27. _appService = GetRequiredService<PatientAppService>();
  28. }
  29. [Fact]
  30. public async Task GetListInFilterAsync()
  31. {
  32. using (var uow = _unitOfWorkManager.Begin())
  33. {
  34. GetListInFilterDto qc = new GetListInFilterDto()
  35. {
  36. };
  37. var result = await _appService.GetListInFilterAsync(qc);
  38. // _output.WriteLine(result.TotalCount.ToString());
  39. //foreach (var item in result)
  40. //{
  41. // Console.WriteLine(item.DisplayName);
  42. // _output.WriteLine(item.DisplayName);
  43. //}
  44. }
  45. }
  46. }
  47. }