use of org.apereo.cas.web.flow.DefaultSingleSignOnParticipationStrategy in project cas by apereo.
the class RenewAuthenticationRequestCheckActionTests method verifyProceed.
@Test
public void verifyProceed() throws Exception {
val context = new MockRequestContext();
val request = new MockHttpServletRequest();
val response = new MockHttpServletResponse();
context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response));
val strategy = new DefaultSingleSignOnParticipationStrategy(servicesManager, casProperties.getSso(), mock(TicketRegistrySupport.class), mock(AuthenticationServiceSelectionPlan.class));
val action = new RenewAuthenticationRequestCheckAction(strategy);
assertEquals(CasWebflowConstants.TRANSITION_ID_PROCEED, action.execute(context).getId());
}
use of org.apereo.cas.web.flow.DefaultSingleSignOnParticipationStrategy in project cas by apereo.
the class RenewAuthenticationRequestCheckActionTests method verifyRenew.
@Test
public void verifyRenew() throws Exception {
val context = new MockRequestContext();
val request = new MockHttpServletRequest();
request.addParameter(CasProtocolConstants.PARAMETER_RENEW, "true");
val response = new MockHttpServletResponse();
context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response));
val strategy = new DefaultSingleSignOnParticipationStrategy(servicesManager, casProperties.getSso(), mock(TicketRegistrySupport.class), mock(AuthenticationServiceSelectionPlan.class));
val action = new RenewAuthenticationRequestCheckAction(strategy);
assertEquals(CasWebflowConstants.TRANSITION_ID_RENEW, action.execute(context).getId());
}
Aggregations