This is the following code. Whenever I run this test, it gets stuck on starting... It works fine with [FACT] but not with [Theory]. What could be the reason? What is the solution of it?
[Theory, AutoMoqData]
public async Task Login_When_Valid_EmailAndPassword_Returns_SuccessResponse(
UserVM MoqResponse,
string tokenResponse,
[Frozen] Mock<IAuthenticationManager> _authenticationManager,
AuthController sut,
UserVM request)
{
_authenticationManager.Setup(x => x.Authenticate(It.IsAny<string>(), It.IsAny<string>())).ReturnsAsync(MoqResponse);
_authenticationManager.Setup(x => x.BuildToken(It.IsAny<UserVM>())).Returns(tokenResponse);
// Act
var result = await sut.Login(request);
var resultObj = result as OkObjectResult;
// Assert
Assert.NotNull(result);
Assert.Equal(200, resultObj.StatusCode);
}