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.

28 lines
720 B

2 years ago
  1. using System.Threading.Tasks;
  2. using BCS.BMC.Models.TokenAuth;
  3. using BCS.BMC.Web.Controllers;
  4. using Shouldly;
  5. using Xunit;
  6. namespace BCS.BMC.Web.Tests.Controllers
  7. {
  8. public class HomeController_Tests: BMCWebTestBase
  9. {
  10. [Fact]
  11. public async Task Index_Test()
  12. {
  13. await AuthenticateAsync(null, new AuthenticateModel
  14. {
  15. UserNameOrEmailAddress = "admin",
  16. Password = "123qwe"
  17. });
  18. //Act
  19. var response = await GetResponseAsStringAsync(
  20. GetUrl<HomeController>(nameof(HomeController.Index))
  21. );
  22. //Assert
  23. response.ShouldNotBeNullOrEmpty();
  24. }
  25. }
  26. }