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.

106 lines
2.7 KiB

using Shentun.Peis.CustomerOrgs;
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.Abstractions;
using Xunit;
using Shentun.Peis.DataMigrations;
namespace Shentun.Peis
{
public class BaseDataHandleTest : PeisApplicationTestBase
{
private readonly ITestOutputHelper _output;
private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly BaseDataHandleAppService _appService;
public BaseDataHandleTest(ITestOutputHelper testOutputHelper)
{
_output = testOutputHelper;
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
_appService = GetRequiredService<BaseDataHandleAppService>();
}
//[Fact]
//public async Task TransferPatientData()
//{
// for (int i = 0; i < 500; i++)
// {
// using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
// {
// var IsHand = await _appService.TransferPatientData();
// await unitOfWork.CompleteAsync();
// _output.WriteLine($"处理{(i + 1) * 1000}");
// if (!IsHand)
// {
// break;
// }
// }
// }
//}
//[Fact]
//public async Task TransferPatientRegisterData()
//{
// for (int i = 0; i < 3000; i++)
// {
// using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
// {
// var IsHand = await _appService.TransferPatientRegisterData();
// await unitOfWork.CompleteAsync();
// _output.WriteLine($"处理{(i + 1) * 1000}");
// if (!IsHand)
// {
// break;
// }
// }
// }
//}
//[Fact]
//public async Task HandPatientRegisterDoctor()
//{
// for (int i = 0; i < 3000; i++)
// {
// using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
// {
// var IsHand = await _appService.HandPatientRegisterDoctor();
// await unitOfWork.CompleteAsync();
// _output.WriteLine($"处理{(i + 1) * 1000}");
// if (!IsHand)
// {
// break;
// }
// }
// }
//}
}
}