Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext.containsBean()


                    "Should not find oauthConnectionInfo bean after parsing " + configLocation);
        assertTrue(context.containsBean("oauthConnector"),
                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);
        UserDataRetrievalService userDataRetrievalService =
            context.getBean("userDataRetrievalService", UserDataRetrievalService.class);
View Full Code Here


                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);
        UserDataRetrievalService userDataRetrievalService =
            context.getBean("userDataRetrievalService", UserDataRetrievalService.class);
       
        Assert.assertFalse(userDataRetrievalService.isStoreUsername(),
View Full Code Here

   
    @Test
    public void testParseConnectionNameWithCustomRetriever() {
        String configLocation = "security-config-ns-connNameAndCustomRetriever.xml";
        ApplicationContext context = new ClassPathXmlApplicationContext(configLocation);
        assertFalse(context.containsBean("oauthConnectionInfo"),
                    "Should not find oauthConnectionInfo bean after parsing " + configLocation);
        assertTrue(context.containsBean("oauthConnector"),
                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("userDataRetrievalService"),
                    "Could not find customUserDataRetrieverService bean after parsing " + configLocation);
View Full Code Here

    public void testParseConnectionNameWithCustomRetriever() {
        String configLocation = "security-config-ns-connNameAndCustomRetriever.xml";
        ApplicationContext context = new ClassPathXmlApplicationContext(configLocation);
        assertFalse(context.containsBean("oauthConnectionInfo"),
                    "Should not find oauthConnectionInfo bean after parsing " + configLocation);
        assertTrue(context.containsBean("oauthConnector"),
                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("userDataRetrievalService"),
                    "Could not find customUserDataRetrieverService bean after parsing " + configLocation);
        assertTrue(context.containsBean("testUserDataRetriever"),
                    "Could not find testUserDataRetriever bean after parsing " + configLocation);
View Full Code Here

        ApplicationContext context = new ClassPathXmlApplicationContext(configLocation);
        assertFalse(context.containsBean("oauthConnectionInfo"),
                    "Should not find oauthConnectionInfo bean after parsing " + configLocation);
        assertTrue(context.containsBean("oauthConnector"),
                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("userDataRetrievalService"),
                    "Could not find customUserDataRetrieverService bean after parsing " + configLocation);
        assertTrue(context.containsBean("testUserDataRetriever"),
                    "Could not find testUserDataRetriever bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
View Full Code Here

                    "Should not find oauthConnectionInfo bean after parsing " + configLocation);
        assertTrue(context.containsBean("oauthConnector"),
                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("userDataRetrievalService"),
                    "Could not find customUserDataRetrieverService bean after parsing " + configLocation);
        assertTrue(context.containsBean("testUserDataRetriever"),
                    "Could not find testUserDataRetriever bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
View Full Code Here

                    "Could not find oauthConnector bean after parsing " + configLocation);
        assertTrue(context.containsBean("userDataRetrievalService"),
                    "Could not find customUserDataRetrieverService bean after parsing " + configLocation);
        assertTrue(context.containsBean("testUserDataRetriever"),
                    "Could not find testUserDataRetriever bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);
View Full Code Here

                    "Could not find customUserDataRetrieverService bean after parsing " + configLocation);
        assertTrue(context.containsBean("testUserDataRetriever"),
                    "Could not find testUserDataRetriever bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);
       
        ForceOAuthConnector connector = context.getBean("oauthConnector", ForceOAuthConnector.class);
View Full Code Here

                    "Could not find testUserDataRetriever bean after parsing " + configLocation);
        assertTrue(context.containsBean("forceRememberMeServices"),
                    "Could not find forceRememberMeServices bean after parsing " + configLocation);
        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);
       
        ForceOAuthConnector connector = context.getBean("oauthConnector", ForceOAuthConnector.class);
       
        ForceConnectionStorageFilter connStorageFilter = context.getBean(ForceConnectionStorageFilter.class);
View Full Code Here

  @Test
  public void testClassPathXmlApplicationContext() throws IOException {
    ApplicationContext context = new ClassPathXmlApplicationContext(
        "/org/springframework/web/context/WEB-INF/applicationContext.xml");
    assertTrue("Has father", context.containsBean("father"));
    assertTrue("Has rod", context.containsBean("rod"));
    assertFalse("Hasn't kerry", context.containsBean("kerry"));
    assertTrue("Doesn't have spouse", ((TestBean) context.getBean("rod")).getSpouse() == null);
    assertTrue("myinit not evaluated", "Roderick".equals(((TestBean) context.getBean("rod")).getName()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.