1234567891011121314151617181920212223242526272829 |
- using System.Threading.Tasks;
- using YGNT.Exam.Models.TokenAuth;
- using YGNT.Exam.Web.Controllers;
- using Shouldly;
- using Xunit;
- namespace YGNT.Exam.Web.Tests.Controllers
- {
- public class HomeController_Tests: ExamWebTestBase
- {
- [Fact]
- public async Task Index_Test()
- {
- await AuthenticateAsync(null, new AuthenticateModel
- {
- UserNameOrEmailAddress = "admin",
- Password = "123qwe"
- });
- //Act
- var response = await GetResponseAsStringAsync(
- GetUrl<HomeController>(nameof(HomeController.Index))
- );
- //Assert
- response.ShouldNotBeNullOrEmpty();
- }
- }
- }
|