29 lines
875 B
C#
Raw Normal View History

2025-05-27 14:27:50 +08:00
namespace JiShe.IoT.Samples
2025-03-11 10:24:11 +08:00
{
/* 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.
*/
2025-05-27 14:27:50 +08:00
public class SampleAppServiceTests : IoTApplicationTestBase
2025-03-11 10:24:11 +08:00
{
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");
}
}
}