Class LoginServiceIntegrationTest
java.lang.Object
jmockit.loginExample.domain.userLogin.LoginServiceIntegrationTest
Equivalent to
LoginServiceNGTest
, but with minimal mocking and no redundant tests.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Disallow concurrent logins.void
Disallow logging into revoked account.void
Not revoke second account after two failed attempts on first account.void
Sets the account to logged in when password matches.void
Sets the account to revoked after three failed login attempts.void
Sets the up one account to be found.void
Throw exception if account not found.
-
Constructor Details
-
LoginServiceIntegrationTest
public LoginServiceIntegrationTest()
-
-
Method Details
-
setUpOneAccountToBeFound
@BeforeMethod public void setUpOneAccountToBeFound()Sets the up one account to be found. -
setAccountToLoggedInWhenPasswordMatches
Sets the account to logged in when password matches.- Throws:
Exception
- the exception
-
setAccountToRevokedAfterThreeFailedLoginAttempts
Sets the account to revoked after three failed login attempts.- Throws:
Exception
- the exception
-
notRevokeSecondAccountAfterTwoFailedAttemptsOnFirstAccount
Not revoke second account after two failed attempts on first account.- Throws:
Exception
- the exception
-
disallowConcurrentLogins
public void disallowConcurrentLogins()Disallow concurrent logins. -
throwExceptionIfAccountNotFound
public void throwExceptionIfAccountNotFound()Throw exception if account not found. -
disallowLoggingIntoRevokedAccount
public void disallowLoggingIntoRevokedAccount()Disallow logging into revoked account.
-