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/LocalUserLookupService_Test...

29 lines
1006 B

using System.Threading.Tasks;
using Shouldly;
using Volo.Abp.Modularity;
using Xunit;
namespace Volo.Abp.Users
{
public abstract class LocalUserLookupService_Tests<TStartupModule> : AbpUsersTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
private readonly IAbpUserLookupService _lookupService;
private readonly AbpUsersLocalTestData _localTestData;
protected LocalUserLookupService_Tests()
{
_lookupService = GetRequiredService<IAbpUserLookupService>();
_localTestData = GetRequiredService<AbpUsersLocalTestData>();
}
[Fact]
public async Task FindByUserNameAsync()
{
(await _lookupService.FindByUserNameAsync(_localTestData.John.UserName)).ShouldNotBeNull();
(await _lookupService.FindByUserNameAsync(_localTestData.David.UserName)).ShouldNotBeNull();
(await _lookupService.FindByUserNameAsync("undefined-user")).ShouldBeNull();
}
}
}