Search in sources :

Example 6 with DefaultServicesManager

use of org.apereo.cas.services.DefaultServicesManager in project cas by apereo.

the class LogoutActionTests method onSetUp.

@Before
public void onSetUp() throws Exception {
    this.request = new MockHttpServletRequest();
    this.requestContext = mock(RequestContext.class);
    final ServletExternalContext servletExternalContext = mock(ServletExternalContext.class);
    when(this.requestContext.getExternalContext()).thenReturn(servletExternalContext);
    when(servletExternalContext.getNativeRequest()).thenReturn(request);
    when(servletExternalContext.getNativeResponse()).thenReturn(new MockHttpServletResponse());
    when(this.requestContext.getFlowScope()).thenReturn(new LocalAttributeMap());
    this.serviceManager = new DefaultServicesManager(new InMemoryServiceRegistry());
    this.serviceManager.load();
}
Also used : LocalAttributeMap(org.springframework.webflow.core.collection.LocalAttributeMap) MockHttpServletRequest(org.springframework.mock.web.MockHttpServletRequest) ServletExternalContext(org.springframework.webflow.context.servlet.ServletExternalContext) RequestContext(org.springframework.webflow.execution.RequestContext) DefaultServicesManager(org.apereo.cas.services.DefaultServicesManager) MockHttpServletResponse(org.springframework.mock.web.MockHttpServletResponse) InMemoryServiceRegistry(org.apereo.cas.services.InMemoryServiceRegistry) Before(org.junit.Before)

Aggregations

DefaultServicesManager (org.apereo.cas.services.DefaultServicesManager)6 InMemoryServiceRegistry (org.apereo.cas.services.InMemoryServiceRegistry)6 Before (org.junit.Before)5 WebApplicationServiceFactory (org.apereo.cas.authentication.principal.WebApplicationServiceFactory)2 DefaultAccessStrategyMapper (org.apereo.cas.mgmt.services.web.factory.DefaultAccessStrategyMapper)2 DefaultProxyPolicyMapper (org.apereo.cas.mgmt.services.web.factory.DefaultProxyPolicyMapper)2 DefaultRegisteredServiceFactory (org.apereo.cas.mgmt.services.web.factory.DefaultRegisteredServiceFactory)2 DefaultRegisteredServiceMapper (org.apereo.cas.mgmt.services.web.factory.DefaultRegisteredServiceMapper)2 DefaultUsernameAttributeProviderMapper (org.apereo.cas.mgmt.services.web.factory.DefaultUsernameAttributeProviderMapper)2 RegisteredService (org.apereo.cas.services.RegisteredService)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 DefaultCasProtocolAttributeEncoder (org.apereo.cas.authentication.support.DefaultCasProtocolAttributeEncoder)1 ManageRegisteredServicesMultiActionController (org.apereo.cas.mgmt.services.web.ManageRegisteredServicesMultiActionController)1 RegisteredServiceSimpleFormController (org.apereo.cas.mgmt.services.web.RegisteredServiceSimpleFormController)1 AttributeFormDataPopulator (org.apereo.cas.mgmt.services.web.factory.AttributeFormDataPopulator)1 SamlServiceFactory (org.apereo.cas.support.saml.authentication.principal.SamlServiceFactory)1 SamlRegisteredService (org.apereo.cas.support.saml.services.SamlRegisteredService)1 Saml10ObjectBuilder (org.apereo.cas.support.saml.util.Saml10ObjectBuilder)1