Package org.apache.commons.configuration2

Examples of org.apache.commons.configuration2.SystemConfiguration


     * Tests whether the configuration can be closed.
     */
    @Test
    public void testClose()
    {
        TrackedNodeModel model = EasyMock.createMock(TrackedNodeModel.class);
        EasyMock.expect(model.getSelector()).andReturn(SELECTOR).anyTimes();
        model.close();
        EasyMock.replay(model);

        SubnodeConfiguration config = new SubnodeConfiguration(parent, model);
        config.close();
        EasyMock.verify(model);
View Full Code Here


     * Tests if setting a node combiner causes an invalidation.
     */
    @Test
    public void testSetNodeCombiner()
    {
        NodeCombiner combiner = new UnionCombiner();
        config.setNodeCombiner(combiner);
        assertSame("Node combiner was not set", combiner, config
                .getNodeCombiner());
        listener.checkEvent(1, 0);
    }
View Full Code Here

     */
    @Test
    public void testSetNodeCombinerSynchronized()
    {
        SynchronizerTestImpl sync = setUpSynchronizerTest();
        config.setNodeCombiner(new UnionCombiner());
        sync.verify(Methods.BEGIN_WRITE, Methods.END_WRITE);
        checkCombinedRootNotConstructed();
    }
View Full Code Here

     * Tests changing the expression engine.
     */
    @Test
    public void testSetExpressionEngine()
    {
        parent.setExpressionEngine(new XPathExpressionEngine());
        setUpSubnodeConfig("tables/table[1]");
        assertEquals("Wrong field name", NodeStructureHelper.field(0, 1),
                config.getString("fields/field[2]/name"));
        Set<String> keys = ConfigurationAssert.keysToSet(config);
        assertEquals("Wrong number of keys", 2, keys.size());
View Full Code Here

     */
    @Test
    public void testParentChangeDetatchException()
    {
        setUpSubnodeConfig();
        parent.setExpressionEngine(new XPathExpressionEngine());
        parent.addProperty("newProp", "value");
        checkSubConfigContent();
    }
View Full Code Here

    }

    private SystemConfiguration retrieveSystemConfiguration( PersistenceManagerFactory pmf )
        throws ContinuumStoreException
    {
        SystemConfiguration result;
        List systemConfs = PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager( pmf ),
                                                                 SystemConfiguration.class, null, (String) null );

        if ( systemConfs == null || systemConfs.isEmpty() )
        {
View Full Code Here

    }

    private SystemConfiguration retrieveSystemConfiguration( PersistenceManagerFactory pmf )
        throws ContinuumStoreException
    {
        SystemConfiguration result;
        List systemConfs = PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager( pmf ),
                                                                 SystemConfiguration.class, null, (String) null );

        if ( systemConfs == null || systemConfs.isEmpty() )
        {
View Full Code Here

    }

    private SystemConfiguration retrieveSystemConfiguration( PersistenceManagerFactory pmf )
        throws ContinuumStoreException
    {
        SystemConfiguration result;
        List systemConfs = PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager( pmf ),
                                                                 SystemConfiguration.class, null, (String) null );

        if ( systemConfs == null || systemConfs.isEmpty() )
        {
View Full Code Here

    }

    private SystemConfiguration retrieveSystemConfiguration( PersistenceManagerFactory pmf )
        throws ContinuumStoreException
    {
        SystemConfiguration result;
        List systemConfs = PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager( pmf ),
                                                                 SystemConfiguration.class, null, (String) null );

        if ( systemConfs == null || systemConfs.isEmpty() )
        {
View Full Code Here

    }

    private SystemConfiguration retrieveSystemConfiguration( PersistenceManagerFactory pmf )
        throws ContinuumStoreException
    {
        SystemConfiguration result;
        List systemConfs = PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager( pmf ),
                                                                 SystemConfiguration.class, null, (String) null );

        if ( systemConfs == null || systemConfs.isEmpty() )
        {
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration2.SystemConfiguration

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.