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.

49 lines
1.6 KiB

  1. using Shentun.Peis.Models;
  2. using Shentun.Peis.PatientRegisters;
  3. using Shentun.Peis.Patients;
  4. using Shentun.Peis.RegisterCheckItems;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Runtime.ConstrainedExecution;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using Volo.Abp.Domain.Repositories;
  12. using Volo.Abp.Uow;
  13. using Xunit;
  14. using Xunit.Abstractions;
  15. namespace Shentun.Peis
  16. {
  17. public class RegisterCheckItemAppServiceTest : PeisApplicationTestBase
  18. {
  19. private readonly IRepository<RegisterCheckItem> _repository;
  20. private readonly RegisterCheckItemAppService _appService;
  21. private readonly ITestOutputHelper _output;
  22. private readonly IUnitOfWorkManager _unitOfWorkManager;
  23. public RegisterCheckItemAppServiceTest(ITestOutputHelper testOutputHelper)
  24. {
  25. _output = testOutputHelper;
  26. _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
  27. _repository = GetRequiredService<IRepository<RegisterCheckItem>>();
  28. _appService = GetRequiredService<RegisterCheckItemAppService>();
  29. }
  30. [Fact]
  31. public async Task GetListInRegisterCheckIdAsync()
  32. {
  33. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  34. {
  35. var items = await _appService.GetListInRegisterCheckIdAsync(
  36. new Guid("3a11ee70-034c-1ce6-40f9-7eabb02830a9"),
  37. new Guid("3a11ee70-02cb-c5e6-a087-79ecdd0356b6"));
  38. _output.WriteLine(items.Count().ToString());
  39. await unitOfWork.CompleteAsync();
  40. }
  41. }
  42. }
  43. }