@Test public void shouldGetLoginStageWhenAuthIndexTypeLevelAndRequirementsNotSetYet() { given(loginConfiguration.getIndexType()).willReturn(AuthIndexType.LEVEL); given(authContext.getRequirements()).willReturn(null); given(authContext.getStatus()).willReturn(AuthContext.Status.IN_PROGRESS); LoginStage loginStage = loginProcess.getLoginStage(); verify(authContext).hasMoreRequirements(); assertEquals(loginStage, LoginStage.REQUIREMENTS_WAITING); }
public LoginStage getLoginStage() { boolean isLevelOrCompositeIndexType = AuthIndexType.LEVEL.equals(loginConfiguration.getIndexType()) || AuthIndexType.COMPOSITE.equals(loginConfiguration.getIndexType()); if ((isLevelOrCompositeIndexType && authContext.getRequirements() == null) || !isLevelOrCompositeIndexType) { authContext.hasMoreRequirements(); } if (AuthContext.Status.IN_PROGRESS.equals(authContext.getStatus())) { return LoginStage.REQUIREMENTS_WAITING; } else { return LoginStage.COMPLETE; } }
LoginProcess { public LoginStage getLoginStage() { boolean isLevelOrCompositeIndexType = AuthIndexType.LEVEL.equals(loginConfiguration.getIndexType()) || AuthIndexType.COMPOSITE.equals(loginConfiguration.getIndexType()); if ((isLevelOrCompositeIndexType && authContext.getRequirements() == null) || !isLevelOrCompositeIndexType) { authContext.hasMoreRequirements(); } if (AuthContext.Status.IN_PROGRESS.equals(authContext.getStatus())) { return LoginStage.REQUIREMENTS_WAITING; } else { return LoginStage.COMPLETE; } } }
LoginProcess { public LoginStage getLoginStage() { boolean isLevelOrCompositeIndexType = AuthIndexType.LEVEL.equals(loginConfiguration.getIndexType()) || AuthIndexType.COMPOSITE.equals(loginConfiguration.getIndexType()); if ((isLevelOrCompositeIndexType && authContext.getRequirements() == null) || !isLevelOrCompositeIndexType) { authContext.hasMoreRequirements(); } if (AuthContext.Status.IN_PROGRESS.equals(authContext.getStatus())) { return LoginStage.REQUIREMENTS_WAITING; } else { return LoginStage.COMPLETE; } } LoginProcess(LoginAuthenticator loginAuthenticator, LoginConfiguration loginConfiguration,
            AuthContextLocalWrapper authContext, CoreServicesWrapper coreServicesWrapper); }
LoginProcess { public LoginStage getLoginStage() { boolean isLevelOrCompositeIndexType = AuthIndexType.LEVEL.equals(loginConfiguration.getIndexType()) || AuthIndexType.COMPOSITE.equals(loginConfiguration.getIndexType()); if ((isLevelOrCompositeIndexType && authContext.getRequirements() == null) || !isLevelOrCompositeIndexType) { authContext.hasMoreRequirements(); } if (AuthContext.Status.IN_PROGRESS.equals(authContext.getStatus())) { return LoginStage.REQUIREMENTS_WAITING; } else { return LoginStage.COMPLETE; } } LoginProcess(LoginAuthenticator loginAuthenticator, LoginConfiguration loginConfiguration,
            AuthContextLocalWrapper authContext, CoreServicesWrapper coreServicesWrapper); LoginStage getLoginStage(); Callback[] getCallbacks(); PagePropertiesCallback getPagePropertiesCallback(); LoginProcess next(Callback[] callbacks); boolean isSuccessful(); AuthContextLocalWrapper getAuthContext(); LoginConfiguration getLoginConfiguration(); }
LoginProcess { public LoginStage getLoginStage() { boolean isLevelOrCompositeIndexType = AuthIndexType.LEVEL.equals(loginConfiguration.getIndexType()) || AuthIndexType.COMPOSITE.equals(loginConfiguration.getIndexType()); if ((isLevelOrCompositeIndexType && authContext.getRequirements() == null) || !isLevelOrCompositeIndexType) { authContext.hasMoreRequirements(); } if (AuthContext.Status.IN_PROGRESS.equals(authContext.getStatus())) { return LoginStage.REQUIREMENTS_WAITING; } else { return LoginStage.COMPLETE; } } LoginProcess(LoginAuthenticator loginAuthenticator, LoginConfiguration loginConfiguration,
            AuthContextLocalWrapper authContext, CoreServicesWrapper coreServicesWrapper); LoginStage getLoginStage(); Callback[] getCallbacks(); PagePropertiesCallback getPagePropertiesCallback(); LoginProcess next(Callback[] callbacks); boolean isSuccessful(); AuthContextLocalWrapper getAuthContext(); LoginConfiguration getLoginConfiguration();  }