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.

32 lines
875 B

  1. using Shouldly;
  2. using System.Threading.Tasks;
  3. using Volo.Abp.Identity;
  4. using Xunit;
  5. namespace Shentun.Sms.Samples;
  6. /* This is just an example test class.
  7. * Normally, you don't test code of the modules you are using
  8. * (like IIdentityUserAppService here).
  9. * Only test your own application services.
  10. */
  11. public class SampleAppServiceTests : SmsApplicationTestBase
  12. {
  13. private readonly IIdentityUserAppService _userAppService;
  14. public SampleAppServiceTests()
  15. {
  16. _userAppService = GetRequiredService<IIdentityUserAppService>();
  17. }
  18. [Fact]
  19. public async Task Initial_Data_Should_Contain_Admin_User()
  20. {
  21. //Act
  22. var result = await _userAppService.GetListAsync(new GetIdentityUsersInput());
  23. //Assert
  24. result.TotalCount.ShouldBeGreaterThan(0);
  25. result.Items.ShouldContain(u => u.UserName == "admin");
  26. }
  27. }