Package org.springframework.security.config.util

Examples of org.springframework.security.config.util.InMemoryXmlApplicationContext


        verifyStatic();
        ReflectionUtils.invokeMethod(same(method), any(HttpServletRequest.class));
    }

    private void loadContext(String context) {
        this.context = new InMemoryXmlApplicationContext(context);
        this.springSecurityFilterChain = this.context.getBean("springSecurityFilterChain",Filter.class);
    }
View Full Code Here


        }
        return ultimateCause(e.getCause());
    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

    }

    @Test
    public void pre32SchemaAreNotSupported() throws Exception {
        try {
            new InMemoryXmlApplicationContext(
                    "<user-service id='us'>" +
                    "  <user name='bob' password='bobspassword' authorities='ROLE_A' />" +
                    "</user-service>", "3.0.3", null
            );
            fail("Expected BeanDefinitionParsingException");
View Full Code Here

        String className = "javax.servlet.Filter";
        thrown.expect(BeanDefinitionParsingException.class);
        thrown.expectMessage("NoClassDefFoundError: "+className);
        spy(ClassUtils.class);
        doThrow(new NoClassDefFoundError(className)).when(ClassUtils.class,"forName",eq(FILTER_CHAIN_PROXY_CLASSNAME),any(ClassLoader.class));
        new InMemoryXmlApplicationContext(
                XML_AUTHENTICATION_MANAGER +
                XML_HTTP_BLOCK);
    }
View Full Code Here

    @Test
    public void filterNoClassDefFoundErrorNoHttpBlock() throws Exception {
        String className = "javax.servlet.Filter";
        spy(ClassUtils.class);
        doThrow(new NoClassDefFoundError(className)).when(ClassUtils.class,"forName",eq(FILTER_CHAIN_PROXY_CLASSNAME),any(ClassLoader.class));
        new InMemoryXmlApplicationContext(
                XML_AUTHENTICATION_MANAGER);
        // should load just fine since no http block
    }
View Full Code Here

        String className = FILTER_CHAIN_PROXY_CLASSNAME;
        thrown.expect(BeanDefinitionParsingException.class);
        thrown.expectMessage("ClassNotFoundException: "+className);
        spy(ClassUtils.class);
        doThrow(new ClassNotFoundException(className)).when(ClassUtils.class,"forName",eq(FILTER_CHAIN_PROXY_CLASSNAME),any(ClassLoader.class));
        new InMemoryXmlApplicationContext(
                XML_AUTHENTICATION_MANAGER +
                XML_HTTP_BLOCK);
    }
View Full Code Here

    @Test
    public void filterChainProxyClassNotFoundExceptionNoHttpBlock() throws Exception {
        String className = FILTER_CHAIN_PROXY_CLASSNAME;
        spy(ClassUtils.class);
        doThrow(new ClassNotFoundException(className)).when(ClassUtils.class,"forName",eq(FILTER_CHAIN_PROXY_CLASSNAME),any(ClassLoader.class));
        new InMemoryXmlApplicationContext(
                XML_AUTHENTICATION_MANAGER);
        // should load just fine since no http block
    }
View Full Code Here

            appContext = null;
        }
    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

        ProviderManager pm = (ProviderManager) appContext.getBeansOfType(ProviderManager.class).values().toArray()[0];
        assertFalse(pm.isEraseCredentialsAfterAuthentication());
    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

    public void userServiceWithMissingPropertiesFileThrowsException() {
        setContext("<user-service id='service' properties='classpath:doesntexist.properties'/>");
    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.config.util.InMemoryXmlApplicationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.