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.
51 lines
1.6 KiB
51 lines
1.6 KiB
using Shentun.Peis.CustomerOrgs;
|
|
using Shentun.Peis.GuideTypes;
|
|
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 CustomerOrgAppServiceTest : PeisApplicationTestBase
|
|
{
|
|
private readonly IRepository<CustomerOrg, Guid> _repository;
|
|
private readonly CustomerOrgAppService _appService;
|
|
private readonly ITestOutputHelper _output;
|
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
|
public CustomerOrgAppServiceTest(ITestOutputHelper testOutputHelper)
|
|
{
|
|
_output = testOutputHelper;
|
|
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
|
|
_repository = GetRequiredService<IRepository<CustomerOrg, Guid>>();
|
|
_appService = GetRequiredService<CustomerOrgAppService>();
|
|
}
|
|
|
|
[Fact]
|
|
public async Task CreateAsync()
|
|
{
|
|
|
|
var result = await _appService.CreateAsync(new CreateCustomerOrgDto()
|
|
{
|
|
OrganizationUnitId = new Guid("68f2d834-2bf0-4978-ad54-d2133c12a333"),
|
|
ParentId = new Guid("3a0c5101-a6a6-e48a-36ec-33e7567a99e6"),
|
|
DisplayName = "Foo",
|
|
ShortName = "Bar",
|
|
OrgTypeId = new Guid("3a0c5100-9a4e-243b-cd63-e0b0391623dd"),
|
|
IsActive = 'N',
|
|
IsLock = 'N'
|
|
|
|
}); ;
|
|
_output.WriteLine(result.Id.ToString());
|
|
|
|
|
|
}
|
|
|
|
}
|
|
}
|