Hospital Management internal project. Build with Abp.io architecture.
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.

34 lines
1018 B

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