Package org.apache.cloudstack.spring.module.model

Examples of org.apache.cloudstack.spring.module.model.ModuleDefinitionSet


    @Test
    public void testLoad() throws IOException {
       
        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
       
        ModuleDefinitionSet set = factory.loadModules(defs, "base");
       
        assertNotNull(set.getApplicationContext("base"));
    }
View Full Code Here


       
        InitTest.initted = false;
       
        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
       
        ModuleDefinitionSet set = factory.loadModules(defs, "base");
       
        assertTrue(!InitTest.initted);
        assertEquals("a string", set.getApplicationContext("child1").getBean("override", String.class));
    }
View Full Code Here

    }
   
    @Test
    public void testExcluded() throws IOException {
        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
        ModuleDefinitionSet set = factory.loadModules(defs, "base");

        assertNull(set.getApplicationContext("excluded"));
        assertNull(set.getApplicationContext("excluded2"));
        assertNull(set.getApplicationContext("orphan-of-excluded"));
    }
View Full Code Here

    }
   
    @Test
    public void testBeans() throws IOException {
        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
        ModuleDefinitionSet set = factory.loadModules(defs, "base");
       
        testBeansInContext(set, "base", 1, new String[] { "base" }, new String[] { "child1", "child2", "child1-1" });
        testBeansInContext(set, "child1", 2, new String[] { "base", "child1" }, new String[] { "child2", "child1-1" });
        testBeansInContext(set, "child2", 4, new String[] { "base", "child2" }, new String[] { "child1", "child1-1" });
        testBeansInContext(set, "child1-1", 3, new String[] { "base", "child1", "child1-1" }, new String[] { "child2" });
View Full Code Here

    @Test
    public void testLoad() throws IOException {

        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();

        ModuleDefinitionSet set = factory.loadModules(defs, "base");

        assertNotNull(set.getApplicationContext("base"));
    }
View Full Code Here

        InitTest.initted = false;

        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();

        ModuleDefinitionSet set = factory.loadModules(defs, "base");

        assertTrue(!InitTest.initted);
        assertEquals("a string", set.getApplicationContext("child1").getBean("override", String.class));
    }
View Full Code Here

    }

    @Test
    public void testExcluded() throws IOException {
        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
        ModuleDefinitionSet set = factory.loadModules(defs, "base");

        assertNull(set.getApplicationContext("excluded"));
        assertNull(set.getApplicationContext("excluded2"));
        assertNull(set.getApplicationContext("orphan-of-excluded"));
    }
View Full Code Here

    }

    @Test
    public void testBeans() throws IOException {
        ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
        ModuleDefinitionSet set = factory.loadModules(defs, "base");

        testBeansInContext(set, "base", 1, new String[] {"base"}, new String[] {"child1", "child2", "child1-1"});
        testBeansInContext(set, "child1", 2, new String[] {"base", "child1"}, new String[] {"child2", "child1-1"});
        testBeansInContext(set, "child2", 4, new String[] {"base", "child2"}, new String[] {"child1", "child1-1"});
        testBeansInContext(set, "child1-1", 3, new String[] {"base", "child1", "child1-1"}, new String[] {"child2"});
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.spring.module.model.ModuleDefinitionSet

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.