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.

43 lines
1.6 KiB

  1. using Shentun.Peis.ChargeRequests;
  2. using Shentun.Peis.Models;
  3. using Shentun.Peis.TransToWebPeis;
  4. using Shentun.Peis.TransToWebPeiss;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using Volo.Abp.Domain.Repositories;
  11. using Volo.Abp.Uow;
  12. using Xunit;
  13. using Xunit.Abstractions;
  14. namespace Shentun.Peis
  15. {
  16. public class TransToWebPeisAppServiceTest : PeisApplicationTestBase
  17. {
  18. private readonly IRepository<ChargeRequest, Guid> _repository;
  19. private readonly TransToWebPeisAppService _appService;
  20. private readonly ITestOutputHelper _output;
  21. private readonly IUnitOfWorkManager _unitOfWorkManager;
  22. public TransToWebPeisAppServiceTest(ITestOutputHelper testOutputHelper)
  23. {
  24. _output = testOutputHelper;
  25. _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
  26. _repository = GetRequiredService<IRepository<ChargeRequest, Guid>>();
  27. _appService = GetRequiredService<TransToWebPeisAppService > ();
  28. }
  29. [Fact]
  30. public async Task UploadPeisReportAsync()
  31. {
  32. var uploadPeisReportIuputDto = new UploadPeisReportIuputDto()
  33. {
  34. PatientRegisterId = new Guid("3a128197-3e61-23d3-1115-aed602ab82a8"),
  35. //ReportBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\prog20230709\\体检报告.pdf"),
  36. ReportBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\upload.pdf"),
  37. };
  38. await _appService.UploadPeisReportAsync(uploadPeisReportIuputDto);
  39. }
  40. }
  41. }