Examples of SynchronizerTestImpl


Examples of org.apache.commons.configuration2.SynchronizerTestImpl

     */
    @Test
    public void testLoadSynchronized() throws ConfigurationException
    {
        PropertiesConfiguration config = new PropertiesConfiguration();
        SynchronizerTestImpl sync = new SynchronizerTestImpl();
        config.setSynchronizer(sync);
        FileHandler handler = new FileHandler(config);
        handler.load(ConfigurationAssert.getTestFile("test.properties"));
        sync.verifyStart(Methods.BEGIN_WRITE);
        sync.verifyEnd(Methods.END_WRITE);
    }
View Full Code Here

Examples of org.apache.commons.configuration2.SynchronizerTestImpl

    @Test
    public void testSaveSynchronized() throws ConfigurationException, IOException
    {
        PropertiesConfiguration config = new PropertiesConfiguration();
        config.addProperty("test.synchronized", Boolean.TRUE);
        SynchronizerTestImpl sync = new SynchronizerTestImpl();
        config.setSynchronizer(sync);
        FileHandler handler = new FileHandler(config);
        File f = folder.newFile();
        handler.save(f);
        sync.verify(Methods.BEGIN_WRITE, Methods.END_WRITE);
    }
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.