Examples of needsReload()


Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

    public void testNeedsReload() throws Exception {
        container.getInstance(FileManager.class).setReloadingConfigs(true);
        final String filename = "com/opensymphony/xwork2/config/providers/xwork-test-actions.xml";
        ConfigurationProvider provider = buildConfigurationProvider(filename);

        assertTrue(!provider.needsReload());

        File file = new File(getClass().getResource("/" + filename).toURI());
        assertTrue("not exists: " + file.toString(), file.exists());
        changeFileTime(file);
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

        File file = new File(getClass().getResource("/" + filename).toURI());
        assertTrue("not exists: " + file.toString(), file.exists());
        changeFileTime(file);

        assertTrue(provider.needsReload());
    }

    public void testInheritence() throws Exception {
        final String filename = "com/opensymphony/xwork2/config/providers/xwork-include-parent.xml";
        ConfigurationProvider provider = buildConfigurationProvider(filename);
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

    public void testEmptySpaces() throws Exception {
        final String filename = "com/opensymphony/xwork2/config/providers/xwork- test.xml";
        container.getInstance(FileManager.class).setReloadingConfigs(true);

        ConfigurationProvider provider = buildConfigurationProvider(filename);
        assertTrue(!provider.needsReload());

        URI uri = ClassLoaderUtil.getResource(filename, ConfigurationProvider.class).toURI();

        File file = new File(uri);
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

        File file = new File(uri);

        assertTrue(file.exists());
        changeFileTime(file);

        assertTrue(provider.needsReload());
    }

    public void testConfigsInJarFiles() throws Exception {
        container.getInstance(FileManager.class).setReloadingConfigs(true);
        testProvider("xwork-jar.xml");
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

        testProvider("xwork - zip2.xml");
    }

    private void testProvider(String configFile) throws Exception {
        ConfigurationProvider provider = buildConfigurationProvider(configFile);
        assertTrue(!provider.needsReload());

        String fullPath = ClassLoaderUtil.getResource(configFile, ConfigurationProvider.class).toString();

        int startIndex = fullPath.indexOf(":file:/");
        int endIndex = fullPath.indexOf("!/");
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

        File file = new File(jar);

        assertTrue("File [" + file + "] doesn't exist!", file.exists());
        file.setLastModified(System.currentTimeMillis());

        assertTrue(!provider.needsReload());
    }

}
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

    public void testNeedsReload() throws Exception {
        FileManager.setReloadingConfigs(true);
        final String filename = "com/opensymphony/xwork2/config/providers/xwork-test-actions.xml";
        ConfigurationProvider provider = buildConfigurationProvider(filename);

        assertTrue(!provider.needsReload());

        File file = new File(getClass().getResource("/"+filename).getFile());
        assertTrue(file.exists());
        file.setLastModified(System.currentTimeMillis());
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

        File file = new File(getClass().getResource("/"+filename).getFile());
        assertTrue(file.exists());
        file.setLastModified(System.currentTimeMillis());

        assertTrue(provider.needsReload());
    }

    public void testInheritence() throws Exception {
        final String filename = "com/opensymphony/xwork2/config/providers/xwork-include-parent.xml";
        ConfigurationProvider provider = buildConfigurationProvider(filename);
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

    public void testEmptySpaces() throws Exception {
        final String filename = "com/opensymphony/xwork2/config/providers/xwork- test.xml";
        FileManager.setReloadingConfigs(true);

        ConfigurationProvider provider = buildConfigurationProvider(filename);
        assertTrue(!provider.needsReload());

        URI uri = ClassLoaderUtil.getResource(filename, ConfigurationProvider.class).toURI();

        File file = new File(uri);
View Full Code Here

Examples of com.opensymphony.xwork2.config.ConfigurationProvider.needsReload()

        File file = new File(uri);

        assertTrue(file.exists());
        file.setLastModified(System.currentTimeMillis());

        assertTrue(provider.needsReload());
    }

    public void testConfigsInJarFiles() throws Exception {
        FileManager.setReloadingConfigs(true);
        testProvider("xwork-jar.xml");
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.