Package org.impalaframework.module.source

Examples of org.impalaframework.module.source.IncrementalModuleDefinitionSource


                            "and no module.properties can be found in the classpath for this module .");
                    return false;
                } else {
                    try {
                       
                        IncrementalModuleDefinitionSource definitionSource = new IncrementalModuleDefinitionSource(
                                Impala.getFacade().getModuleManagementFacade().getModuleLocationResolver(),
                                Impala.getFacade().getModuleManagementFacade().getTypeReaderRegistry(),
                                Impala.getRootModuleDefinition(),
                                candidateValue);
                        Impala.init(definitionSource);
View Full Code Here


                            "and no module.properties can be found in the classpath for this module .");
                    return false;
                } else {
                    try {
                       
                        IncrementalModuleDefinitionSource definitionSource = new IncrementalModuleDefinitionSource(
                                Impala.getFacade().getModuleManagementFacade().getModuleLocationResolver(),
                                Impala.getFacade().getModuleManagementFacade().getTypeReaderRegistry(),
                                Impala.getRootModuleDefinition(),
                                candidateValue);
                        Impala.init(definitionSource);
View Full Code Here

        System.out.println(rootModuleDefinition);
    }

    public void testGetSingleModulesToLoad() {
        setExistingDefinition("impala-core", "sample-module2");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module4");
        moduleDefinitionSource.getModuleDefinition();
        List<String> modulesToLoad = moduleDefinitionSource.getModulesToLoad();
        assertEquals(1, modulesToLoad.size());
        assertTrue(modulesToLoad.contains("sample-module4"));
    }
View Full Code Here

        assertTrue(modulesToLoad.contains("sample-module4"));
    }
   
    public void testGetNoModulesToLoad() {
        setExistingDefinition("sample-module4");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module4");
        assertEquals(rootModuleDefinition, moduleDefinitionSource.getModuleDefinition());
        assertTrue(moduleDefinitionSource.getModulesToLoad().isEmpty());
    }
View Full Code Here

        assertTrue(moduleDefinitionSource.getModulesToLoad().isEmpty());
    }
   
    public void testGetMultipleModulesToLoad() {
        setExistingDefinition("impala-core");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module4");
        moduleDefinitionSource.getModuleDefinition();
        List<String> modulesToLoad = moduleDefinitionSource.getModulesToLoad();
        assertEquals(2, modulesToLoad.size());
        assertTrue(modulesToLoad.contains("sample-module4"));
        assertTrue(modulesToLoad.contains("sample-module2"));
    }
View Full Code Here

        assertTrue(modulesToLoad.contains("sample-module2"));
    }
   
    public void testLoadFiveAndSix() {
        setExistingDefinition("impala-core");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module6");
        RootModuleDefinition root = moduleDefinitionSource.getModuleDefinition();
        assertTrue(root.hasSibling("sample-module5"));
       
        ModuleDefinition definition5 = root.findChildDefinition("sample-module5", true);
        assertNotNull(definition5);
        assertFalse(root.hasSibling("sample-module6"));
       
        ModuleDefinition definition6 = root.findChildDefinition("sample-module6", true);
        assertNotNull(definition6);
        assertNotNull(definition5.findChildDefinition("sample-module6", true));
        List<String> asList = definition6.getDependentModuleNames(false);
        assertEquals(Arrays.asList("sample-module5", "sample-module4"), asList);
       
        List<String> modulesToLoad = moduleDefinitionSource.getModulesToLoad();
        assertEquals(2, modulesToLoad.size());
        assertTrue(modulesToLoad.contains("sample-module5"));
        assertTrue(modulesToLoad.contains("sample-module6"));
    }
View Full Code Here

        assertTrue(modulesToLoad.contains("sample-module6"));
    }
   
    public void testLoadFive() {
        setExistingDefinition("impala-core");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module5");
       
        RootModuleDefinition root = moduleDefinitionSource.getModuleDefinition();
        assertTrue(root.hasSibling("sample-module5"));
       
        List<String> modulesToLoad = moduleDefinitionSource.getModulesToLoad();
        assertEquals(1, modulesToLoad.size());
        assertTrue(modulesToLoad.contains("sample-module5"));
    }
View Full Code Here

        assertTrue(modulesToLoad.contains("sample-module5"));
    }
   
    public void testLoadSix() {
        setExistingDefinition("impala-core", "sample-module5");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module6");

        RootModuleDefinition root = moduleDefinitionSource.getModuleDefinition();
        assertTrue(root.hasSibling("sample-module5"));
       
        ModuleDefinition definition5 = root.findChildDefinition("sample-module5", true);
        assertNotNull(definition5);
        ModuleDefinition definition6 = definition5.findChildDefinition("sample-module6", true);
        assertNotNull(definition6);
       
        List<String> modulesToLoad = moduleDefinitionSource.getModulesToLoad();
        assertEquals(1, modulesToLoad.size());
        assertTrue(modulesToLoad.contains("sample-module6"));

        List<String> asList = definition6.getDependentModuleNames(false);
        assertEquals(Arrays.asList("sample-module5", "sample-module4"), asList);
View Full Code Here

        assertEquals(Arrays.asList("sample-module5", "sample-module4"), asList);
    }
   
    public void testGetModuleDefinitionFourFromCore() {
        setExistingDefinition("impala-core");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module4");
        checkDefinition(moduleDefinitionSource);
    }
View Full Code Here

        checkDefinition(moduleDefinitionSource);
    }

    public void testGetModuleDefinitionFourFromTwo() {
        setExistingDefinition("impala-core", "sample-module2");
        IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module4");
        checkDefinition(moduleDefinitionSource);
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.source.IncrementalModuleDefinitionSource

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.