using Shentun.WebPeis.AppointPatientRegisters; using Shentun.WebPeis.AppointSchedules; using Shentun.WebPeis.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; using Volo.Abp.Modularity; using Volo.Abp.Uow; using Xunit; using Xunit.Abstractions; namespace Shentun.WebPeis { public class AppointScheduleAppServiceTest : WebPeisApplicationTestBase where TStartupModule : IAbpModule { private readonly IRepository _repository; private readonly AppointScheduleAppService _appService; private readonly ITestOutputHelper _output; private readonly IUnitOfWorkManager _unitOfWorkManager; public AppointScheduleAppServiceTest(ITestOutputHelper output) { _unitOfWorkManager = GetRequiredService(); _repository = GetRequiredService>(); _appService = GetRequiredService(); _output = output; } [Fact] public async Task GetAppointScheduleDateListAsync() { using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) { var entity = new MedicalCenterIdInputDto() { MedicalCenterId = new Guid("150da355-dfbf-466b-9697-355836a862c4") }; var list = await _appService.GetAppointScheduleDateListAsync(entity); foreach (var item in list) { _output.WriteLine(item.AppointDate.ToString()); } await unitOfWork.CompleteAsync(); } } } }