using Shentun.Peis.ChargeRequests; using Shentun.Peis.CustomerOrgs; using Shentun.Peis.Enums; using Shentun.Peis.LisRequests; using Shentun.Peis.Models; using Shentun.Peis.PatientRegisters; 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 ChargeRequestAppServiceTest : PeisApplicationTestBase { private readonly IRepository _repository; private readonly ChargeRequestAppService _appService; private readonly ITestOutputHelper _output; private readonly IUnitOfWorkManager _unitOfWorkManager; public ChargeRequestAppServiceTest(ITestOutputHelper testOutputHelper) { _output = testOutputHelper; _unitOfWorkManager = GetRequiredService(); _repository = GetRequiredService>(); _appService = GetRequiredService(); } [Fact] public async Task CreateAsync() { using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) { var entity = new CreateChargeRequestDto() { PatientRegisterId = new Guid("3a125ed8-991d-4304-5ca9-36edd0485450"), RegisterCheckAsbitems = new List() { new CreateChargeRequestAsbitemDto() {RegisterCheckAsbitemId = new Guid("3a125ed8-9a40-5c42-ddff-24891bcdb91d")}, new CreateChargeRequestAsbitemDto() {RegisterCheckAsbitemId = new Guid("3a125ed8-9a40-e4af-c333-d7f8116e522b")} } }; var newEntity = await _appService.CreateAsync(entity); //await unitOfWork.CompleteAsync(); } } } }