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.
		
		
		
		
		
			
		
			
				
					
					
						
							42 lines
						
					
					
						
							1.2 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							42 lines
						
					
					
						
							1.2 KiB
						
					
					
				
								using Shentun.Peis.GuidTypes;
							 | 
						|
								using Shentun.Peis.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.Uow;
							 | 
						|
								using Xunit;
							 | 
						|
								using Xunit.Abstractions;
							 | 
						|
								
							 | 
						|
								namespace Shentun.Peis
							 | 
						|
								{
							 | 
						|
								    public class CacheServiceTest : PeisDomainTestBase
							 | 
						|
								    {
							 | 
						|
								        private readonly IRepository<GuideType, Guid> _repository;
							 | 
						|
								        private readonly CacheService _cacheService;
							 | 
						|
								        //private readonly IDbContextProvider<PeisDbContext> _dbContextProvider;
							 | 
						|
								        private readonly ITestOutputHelper _output;
							 | 
						|
								        private readonly IUnitOfWorkManager _unitOfWorkManager;
							 | 
						|
								        public CacheServiceTest(ITestOutputHelper output)
							 | 
						|
								        {
							 | 
						|
								            _output = output;
							 | 
						|
								             
							 | 
						|
								            _repository = GetRequiredService<IRepository<GuideType, Guid>>();
							 | 
						|
								            _cacheService = GetRequiredService<CacheService>();
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								           _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
							 | 
						|
								        }
							 | 
						|
								
							 | 
						|
								        [Fact]
							 | 
						|
								        public async Task GetUserAsync()
							 | 
						|
								        {
							 | 
						|
								
							 | 
						|
								            var item = await _cacheService.GetUserNameAsync(new Guid("3a0c654b-a28c-88da-80b7-d5330710ac50"));
							 | 
						|
								            _output.WriteLine(item);
							 | 
						|
								
							 | 
						|
								        }
							 | 
						|
								    }
							 | 
						|
								}
							 |