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

using Shentun.Pacs.Models;
using Shentun.Pacs.Sexs;
using Shentun.Pacs.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.Pacs
{
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("3a11fe49-5719-0e9e-dd44-0c4aff0900b0"), "doctor_check_check_charge");
_output.WriteLine(item.DisplayName+item.SysParmValueName + item.CreatorName + item.LastModifierName );
}
}
}
}