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.
33 lines
957 B
33 lines
957 B
using Shouldly;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.Identity;
|
|
using Xunit;
|
|
|
|
namespace API.Samples
|
|
{
|
|
/* This is just an example test class.
|
|
* Normally, you don't test code of the modules you are using
|
|
* (like IIdentityUserAppService here).
|
|
* Only test your own application services.
|
|
*/
|
|
public class SampleAppServiceTests : APIApplicationTestBase
|
|
{
|
|
private readonly IIdentityUserAppService _userAppService;
|
|
|
|
public SampleAppServiceTests()
|
|
{
|
|
_userAppService = GetRequiredService<IIdentityUserAppService>();
|
|
}
|
|
|
|
[Fact]
|
|
public async Task Initial_Data_Should_Contain_Admin_User()
|
|
{
|
|
//Act
|
|
var result = await _userAppService.GetListAsync(new GetIdentityUsersInput());
|
|
|
|
//Assert
|
|
result.TotalCount.ShouldBeGreaterThan(0);
|
|
result.Items.ShouldContain(u => u.UserName == "admin");
|
|
}
|
|
}
|
|
}
|
|
|