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.
abp/modules/users/test/Volo.Abp.Users.Tests.Shared/Volo/Abp/Users/AbpUsersTestDataBuilder.cs

29 lines
756 B

using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Users
{
public class AbpUsersTestDataBuilder : ITransientDependency
{
private readonly IAbpUserRepository _userRepository;
private readonly AbpUsersLocalTestData _localTestData;
public AbpUsersTestDataBuilder(
IAbpUserRepository userRepository,
AbpUsersLocalTestData localTestData)
{
_userRepository = userRepository;
_localTestData = localTestData;
}
public void Build()
{
AddUsers();
}
private void AddUsers()
{
_userRepository.Insert(_localTestData.John);
_userRepository.Insert(_localTestData.David);
}
}
}