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.
		
		
		
		
		
			
		
			
				
					
					
						
							54 lines
						
					
					
						
							1.8 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							54 lines
						
					
					
						
							1.8 KiB
						
					
					
				
								using Shentun.Peis.OrganizationUnits;
							 | 
						|
								using Shentun.WebPeis.Asbitems;
							 | 
						|
								using Shentun.WebPeis.MedicalPackages;
							 | 
						|
								using Shentun.WebPeis.Models;
							 | 
						|
								using System;
							 | 
						|
								using System.Collections.Generic;
							 | 
						|
								using System.Linq;
							 | 
						|
								using System.Security.Policy;
							 | 
						|
								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 AsbitemAppServiceTest<TStartupModule> : WebPeisApplicationTestBase<TStartupModule>
							 | 
						|
								    where TStartupModule : IAbpModule
							 | 
						|
								    {
							 | 
						|
								        private readonly IRepository<Asbitem> _repository;
							 | 
						|
								        private readonly AsbitemAppService _appService;
							 | 
						|
								        private readonly ITestOutputHelper _output;
							 | 
						|
								        private readonly IUnitOfWorkManager _unitOfWorkManager;
							 | 
						|
								        public AsbitemAppServiceTest(ITestOutputHelper output)
							 | 
						|
								        {
							 | 
						|
								            _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
							 | 
						|
								            _repository = GetRequiredService<IRepository<Asbitem>>();
							 | 
						|
								            _appService = GetRequiredService<AsbitemAppService>();
							 | 
						|
								            _output = output;
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								       
							 | 
						|
								        [Fact]
							 | 
						|
								        public async Task GetDiseaseScreeningTypeAsbitemListAsync()
							 | 
						|
								        {
							 | 
						|
								            using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
							 | 
						|
								            {
							 | 
						|
								
							 | 
						|
								                var list = await _appService.GetDiseaseScreeningTypeAsbitemListAsync();
							 | 
						|
								                foreach (var item in list)
							 | 
						|
								                {
							 | 
						|
								                    _output.WriteLine("-----------" + item.DiseaseScreeningTypeName);
							 | 
						|
								                    foreach (var asbitem in item.Asbitems)
							 | 
						|
								                    {
							 | 
						|
								                        _output.WriteLine(asbitem.AsbitemName);
							 | 
						|
								                    }
							 | 
						|
								                }
							 | 
						|
								                await unitOfWork.CompleteAsync();
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								    }
							 | 
						|
								}
							 |