Package org.impalaframework.module.monitor

Examples of org.impalaframework.module.monitor.ModuleChangeEvent


        final WebModuleChangeListener listener = new WebModuleChangeListener();
        listener.setServletContext(servletContext);

        ArrayList<ModuleChangeInfo> info = new ArrayList<ModuleChangeInfo>();
        ModuleChangeEvent event = new ModuleChangeEvent(info);

        replay(servletContext);

        listener.moduleContentsModified(event);

        verify(servletContext);

        info.add(new ModuleChangeInfo("p1"));
        info.add(new ModuleChangeInfo("p2"));
        info.add(new ModuleChangeInfo("p2"));

        event = new ModuleChangeEvent(info);

    }  
View Full Code Here


        ArrayList<ModuleChangeInfo> info = new ArrayList<ModuleChangeInfo>();

        info.add(new ModuleChangeInfo("p1"));

        ModuleChangeEvent event = new ModuleChangeEvent(info);
        ServletContext servletContext = createMock(ServletContext.class);
        final WebModuleChangeListener listener = new WebModuleChangeListener();
        listener.setServletContext(servletContext);
        ModuleManagementFacade facade = createMock(ModuleManagementFacade.class);
        ModuleOperationRegistry moduleOperationRegistry = createMock(ModuleOperationRegistry.class);
View Full Code Here

public class BaseModuleChangeListenerTest extends TestCase {

    public final void testGetModifiedModules() {
        BaseModuleChangeListener listener = new BaseModuleChangeListener();
        ArrayList<ModuleChangeInfo> info = new ArrayList<ModuleChangeInfo>();
        ModuleChangeEvent event = new ModuleChangeEvent(info);
        assertTrue(listener.getModifiedModules(event).isEmpty());
       
        info.add(new ModuleChangeInfo("p1"));
        info.add(new ModuleChangeInfo("p2"));
        info.add(new ModuleChangeInfo("p2"));
       
        event = new ModuleChangeEvent(info);
        Set<String> modifiedModules = listener.getModifiedModules(event);
        assertEquals(2, modifiedModules.size());
        assertTrue(modifiedModules.contains("p1"));
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.monitor.ModuleChangeEvent

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.