Examples of ConfigurationEvent


Examples of com.sun.star.ui.ConfigurationEvent

public class _XUIConfigurationListener extends MultiMethodTest {
   
    public XUIConfigurationListener oObj = null;

    public void _elementInserted() {
        ConfigurationEvent event = new ConfigurationEvent();
        oObj.elementInserted(event);
        tRes.tested("elementInserted()", true);
    }
View Full Code Here

Examples of com.sun.star.ui.ConfigurationEvent

        ConfigurationEvent event = new ConfigurationEvent();
        oObj.elementInserted(event);
        tRes.tested("elementInserted()", true);
    }
    public void _elementRemoved() {
        ConfigurationEvent event = new ConfigurationEvent();
        oObj.elementRemoved(event);
        tRes.tested("elementRemoved()", true);
    }
View Full Code Here

Examples of com.sun.star.ui.ConfigurationEvent

        ConfigurationEvent event = new ConfigurationEvent();
        oObj.elementRemoved(event);
        tRes.tested("elementRemoved()", true);
    }
    public void _elementReplaced() {
        ConfigurationEvent event = new ConfigurationEvent();
        oObj.elementReplaced(event);
        tRes.tested("elementReplaced()", true);
    }
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

        config.getString("name");
        assertEquals("Wrong number of events", 2, l.events.size());
        boolean before = true;
        for (Iterator it = l.events.iterator(); it.hasNext();)
        {
            ConfigurationEvent e = (ConfigurationEvent) it.next();
            assertEquals("Wrong configuration", config, e.getSource());
            assertEquals("Wrong event type",
                    HierarchicalConfiguration.EVENT_SUBNODE_CHANGED, e
                            .getType());
            assertNull("Got a property name", e.getPropertyName());
            assertNull("Got a property value", e.getPropertyValue());
            assertEquals("Wrong before flag", before, e.isBeforeUpdate());
            before = !before;
        }
    }
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

    /**
     * Tests if a property add event is correctly processed.
     */
    public void testEventAdd()
    {
        ConfigurationEvent event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_ADD_PROPERTY, TEST_KEY, TEST_VALUE,
                false);
        layout.configurationChanged(event);
        assertTrue("Property not stored", layout.getKeys().contains(TEST_KEY));
        assertEquals("Blanc lines before new property", 0, layout
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

     * Tests adding a property multiple time through an event. The property
     * should then be a multi-line property.
     */
    public void testEventAddMultiple()
    {
        ConfigurationEvent event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_ADD_PROPERTY, TEST_KEY, TEST_VALUE,
                false);
        layout.configurationChanged(event);
        layout.configurationChanged(event);
        assertFalse("No multi-line property", layout.isSingleLine(TEST_KEY));
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

    public void testEventAddExisting() throws ConfigurationException
    {
        builder.addComment(TEST_COMMENT);
        builder.addProperty(TEST_KEY, TEST_VALUE);
        layout.load(builder.getReader());
        ConfigurationEvent event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_ADD_PROPERTY, TEST_KEY, TEST_VALUE,
                false);
        layout.configurationChanged(event);
        assertFalse("No multi-line property", layout.isSingleLine(TEST_KEY));
        assertEquals("Comment was modified", TEST_COMMENT, layout
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

     * Tests if a set property event for a non existing property is correctly
     * handled.
     */
    public void testEventSetNonExisting()
    {
        ConfigurationEvent event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_SET_PROPERTY, TEST_KEY, TEST_VALUE,
                false);
        layout.configurationChanged(event);
        assertTrue("New property was not found", layout.getKeys().contains(
                TEST_KEY));
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

    /**
     * Tests if a property delete event is correctly processed.
     */
    public void testEventDelete()
    {
        ConfigurationEvent event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_ADD_PROPERTY, TEST_KEY, TEST_VALUE,
                false);
        layout.configurationChanged(event);
        event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_CLEAR_PROPERTY, TEST_KEY, null,
                false);
        layout.configurationChanged(event);
        assertFalse("Property still existing", layout.getKeys().contains(
                TEST_KEY));
View Full Code Here

Examples of org.apache.commons.configuration.event.ConfigurationEvent

     * Tests if a clear event is correctly processed.
     */
    public void testEventClearConfig() throws ConfigurationException
    {
        fillLayout();
        ConfigurationEvent event = new ConfigurationEvent(this,
                AbstractConfiguration.EVENT_CLEAR, null, null, false);
        layout.configurationChanged(event);
        assertTrue("Keys not empty", layout.getKeys().isEmpty());
        assertNull("Header comment was not reset", layout.getHeaderComment());
    }
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.