diff --git a/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs b/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs index 7db59b2f7..d12bcee36 100644 --- a/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs +++ b/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs @@ -95,5 +95,20 @@ namespace mRemoteNGTests.Security.Authentication _authenticator.Authenticate(_wrongPassword); Assert.That(authAttempts == _authenticator.MaxAttempts); } + + [Test] + public void AuthenticatorRespectsMaxAttemptsCustomValue() + { + const int customMaxAttempts = 5; + _authenticator.MaxAttempts = customMaxAttempts; + var authAttempts = 0; + _authenticator.AuthenticationRequestor = () => + { + authAttempts++; + return _wrongPassword; + }; + _authenticator.Authenticate(_wrongPassword); + Assert.That(authAttempts == customMaxAttempts); + } } } \ No newline at end of file