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.
		
		
		
		
		
			
		
			
				
					
					
						
							53 lines
						
					
					
						
							1.8 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							53 lines
						
					
					
						
							1.8 KiB
						
					
					
				
								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<TStartupModule> : WebPeisApplicationTestBase<TStartupModule>
							 | 
						|
								    where TStartupModule : IAbpModule
							 | 
						|
								    {
							 | 
						|
								        private readonly IRepository<AppointSchedule> _repository;
							 | 
						|
								        private readonly AppointScheduleAppService _appService;
							 | 
						|
								        private readonly ITestOutputHelper _output;
							 | 
						|
								        private readonly IUnitOfWorkManager _unitOfWorkManager;
							 | 
						|
								        public AppointScheduleAppServiceTest(ITestOutputHelper output)
							 | 
						|
								        {
							 | 
						|
								            _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
							 | 
						|
								            _repository = GetRequiredService<IRepository<AppointSchedule>>();
							 | 
						|
								            _appService = GetRequiredService<AppointScheduleAppService>();
							 | 
						|
								            _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();
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								    }
							 | 
						|
								}
							 |