[java-identity-provider COMMIT] /trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PopulateMultiFactor...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Aug 6 18:58:24 EDT 2016
Author: scantor
Date: Sat Aug 6 18:58:24 2016
New Revision: 8317
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8317&view=rev
Log:
Fix failing test
Modified:
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PopulateMultiFactorAuthenticationContextTest.java
Modified: trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PopulateMultiFactorAuthenticationContextTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PopulateMultiFactorAuthenticationContextTest.java?rev=8317&r1=8316&r2=8317&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PopulateMultiFactorAuthenticationContextTest.java (original)
+++ trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PopulateMultiFactorAuthenticationContextTest.java Sat Aug 6 18:58:24 2016
@@ -24,6 +24,7 @@
import net.shibboleth.idp.authn.AuthenticationFlowDescriptor;
import net.shibboleth.idp.authn.AuthenticationResult;
+import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.authn.MultiFactorAuthenticationTransition;
import net.shibboleth.idp.authn.context.AuthenticationContext;
import net.shibboleth.idp.authn.context.MultiFactorAuthenticationContext;
@@ -64,13 +65,10 @@
@Test public void testEmpty() throws ComponentInitializationException {
action.initialize();
final Event event = action.execute(rc);
- ActionTestingSupport.assertProceedEvent(event);
+ ActionTestingSupport.assertEvent(event, AuthnEventIds.RESELECT_FLOW);
final MultiFactorAuthenticationContext mfa = ac.getSubcontext(MultiFactorAuthenticationContext.class);
- Assert.assertNotNull(mfa);
- Assert.assertEquals(ac.getAttemptedFlow(), mfa.getAuthenticationFlowDescriptor());
- Assert.assertTrue(mfa.getTransitionMap().isEmpty());
- Assert.assertTrue(mfa.getActiveResults().isEmpty());
+ Assert.assertNull(mfa);
}
@Test public void testTransitions() throws ComponentInitializationException {
@@ -115,6 +113,9 @@
desc.initialize();
ac.getAvailableFlows().put(desc.getId(), desc);
+ action.setTransitionMapLookupStrategy(
+ FunctionSupport.<ProfileRequestContext,Map<String,MultiFactorAuthenticationTransition>>constant(
+ Collections.singletonMap("", new MultiFactorAuthenticationTransition())));
action.initialize();
final Event event = action.execute(rc);
ActionTestingSupport.assertProceedEvent(event);
More information about the commits
mailing list