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

using Shentun.Peis.GuideTypes;
using Shentun.Peis.Models;
using Shentun.Peis.Patients;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using Xunit;
using Xunit.Abstractions;
namespace Shentun.Peis
{
public class PatientAppServiceTest : PeisApplicationTestBase
{
private readonly IRepository<Patient, Guid> _repository;
private readonly PatientAppService _appService;
private readonly ITestOutputHelper _output;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public PatientAppServiceTest(ITestOutputHelper testOutputHelper)
{
_output = testOutputHelper;
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
_repository = GetRequiredService<IRepository<Patient, Guid>>();
_appService = GetRequiredService<PatientAppService>();
}
[Fact]
public async Task GetListInFilterAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
GetListInFilterDto qc = new GetListInFilterDto()
{
};
var result = await _appService.GetListInFilterAsync(qc);
// _output.WriteLine(result.TotalCount.ToString());
foreach (var item in result)
{
Console.WriteLine(item.DisplayName);
_output.WriteLine(item.DisplayName);
}
}
}
}
}