4 changed files with 86 additions and 4 deletions
			
			
		- 
					44src/Shentun.Peis.Application/GuideTypes/GuideTypeAppService.cs
 - 
					2src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
 - 
					42test/Shentun.Peis.Application.Tests/ApiWorkTest.cs
 - 
					2test/Shentun.Peis.Domain.Tests/ItemManagerTest.cs
 
@ -0,0 +1,42 @@ | 
				
			|||
using Shentun.Peis.GuideTypes; | 
				
			|||
using Shentun.Peis.Models; | 
				
			|||
using Shentun.Peis.Sexs; | 
				
			|||
using System; | 
				
			|||
using System.Collections.Generic; | 
				
			|||
using System.Linq; | 
				
			|||
using System.Text; | 
				
			|||
using System.Threading.Tasks; | 
				
			|||
using Volo.Abp; | 
				
			|||
using Volo.Abp.Domain.Repositories; | 
				
			|||
using Volo.Abp.Identity; | 
				
			|||
using Volo.Abp.Uow; | 
				
			|||
using Xunit; | 
				
			|||
using Xunit.Abstractions; | 
				
			|||
 | 
				
			|||
namespace Shentun.Peis | 
				
			|||
{ | 
				
			|||
    public class ApiWorkTest : PeisApplicationTestBase | 
				
			|||
    { | 
				
			|||
        private readonly GuideTypeAppService _appService; | 
				
			|||
        private readonly ITestOutputHelper _output; | 
				
			|||
        private readonly IUnitOfWorkManager _unitOfWorkManager; | 
				
			|||
 | 
				
			|||
        public ApiWorkTest(ITestOutputHelper testOutputHelper) | 
				
			|||
        { | 
				
			|||
            _output = testOutputHelper; | 
				
			|||
            _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>(); | 
				
			|||
            _appService = GetRequiredService<GuideTypeAppService>(); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        [Fact] | 
				
			|||
        //[UnitOfWork]
 | 
				
			|||
        public async Task TestApi() | 
				
			|||
        { | 
				
			|||
            using (var aaa = _unitOfWorkManager.Begin(true, true)) | 
				
			|||
            { | 
				
			|||
                await _appService.TestApi(); | 
				
			|||
            } | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue