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.

47 lines
1.7 KiB

using Shentun.Peis.CustomerOrgs;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
using Shentun.Peis.PrintReports;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using Xunit;
using Xunit.Abstractions;
namespace Shentun.Peis
{
public class PrintReportAppServiceTest : PeisApplicationTestBase
{
private readonly IRepository<CustomerOrg, Guid> _repository;
private readonly PrintReportAppService _appService;
private readonly ITestOutputHelper _output;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public PrintReportAppServiceTest(ITestOutputHelper testOutputHelper)
{
_output = testOutputHelper;
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
_repository = GetRequiredService<IRepository<CustomerOrg, Guid>>();
_appService = GetRequiredService<PrintReportAppService>();
}
[Fact]
public async Task GetLisRequestReportAsync()
{
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
{
var items = await _appService.GetLisRequestReportAsync(new Guid("3a11ee70-02cb-c5e6-a087-79ecdd0356b6"));
_output.WriteLine(items.Count().ToString());
foreach (var item in items)
{
_output.WriteLine(item.PatientName + "," + item.CustomerOrgName + "," +
item.DepartmentName + item.AsbitemName);
}
await unitOfWork.CompleteAsync();
}
}
}
}