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.
		
		
		
		
		
			
		
			
				
					
					
						
							57 lines
						
					
					
						
							1.8 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							57 lines
						
					
					
						
							1.8 KiB
						
					
					
				
								using Shentun.Peis.Models;
							 | 
						|
								using Shentun.Peis.Sexs;
							 | 
						|
								using Shentun.Peis.SysParms;
							 | 
						|
								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 SysParmAppServiceTest : PeisApplicationTestBase
							 | 
						|
								    {
							 | 
						|
								        private readonly IRepository<SysParm> _repository;
							 | 
						|
								        private readonly SysParmAppService _appService;
							 | 
						|
								        private readonly ITestOutputHelper _output;
							 | 
						|
								        private readonly IUnitOfWorkManager _unitOfWorkManager;
							 | 
						|
								        public SysParmAppServiceTest(ITestOutputHelper testOutputHelper)
							 | 
						|
								        {
							 | 
						|
								            _output = testOutputHelper;
							 | 
						|
								            _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
							 | 
						|
								            _repository = GetRequiredService<IRepository<SysParm>>();
							 | 
						|
								            _appService = GetRequiredService<SysParmAppService>();
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        [Fact]
							 | 
						|
								        public async Task GetListInSysParmValueNameAsync()
							 | 
						|
								        {
							 | 
						|
								            using (var uow = _unitOfWorkManager.Begin())
							 | 
						|
								            {
							 | 
						|
								                var list = await _appService.GetListInSysParmValueNameAsync("doctor_check_rule");
							 | 
						|
								
							 | 
						|
								                foreach (var item in list)
							 | 
						|
								                {
							 | 
						|
								                    _output.WriteLine(item.DisplayName);
							 | 
						|
								                }
							 | 
						|
								            }
							 | 
						|
								              
							 | 
						|
								        }
							 | 
						|
								        [Fact]
							 | 
						|
								        public async Task GetSysParmValueListInSysParmAsync()
							 | 
						|
								        {
							 | 
						|
								            using (var uow = _unitOfWorkManager.Begin())
							 | 
						|
								            {
							 | 
						|
								                var item = await _appService.GetSysParmValueListInSysParmAsync(
							 | 
						|
								                    new Guid("4ec3a153-36bf-4555-9f3f-7248aeb323fe"), "doctor_check_check_charge");
							 | 
						|
								
							 | 
						|
								                _output.WriteLine(item.DisplayName+item.SysParmValueName + item.CreatorName + item.LastModifierName );
							 | 
						|
								            }
							 | 
						|
								
							 | 
						|
								        }
							 | 
						|
								    }
							 | 
						|
								}
							 |