Package org.modeshape.jcr.api.observation

Examples of org.modeshape.jcr.api.observation.PropertyEvent


        assertTrue("Path for added property is wrong: actual=" + propertyAddedEvent.getPath() + ", expected="
                   + prop1.getPath(),
                   containsPath(listener, prop1.getPath()));

        assertTrue(propertyAddedEvent instanceof PropertyEvent);
        PropertyEvent propertyEvent = (PropertyEvent) propertyAddedEvent;

        assertEquals("prop1 content", propertyEvent.getCurrentValue());
        assertEquals(1, propertyEvent.getCurrentValues().size());
        assertEquals("prop1 content", propertyEvent.getCurrentValues().get(0));
        assertFalse(propertyEvent.isMultiValue());

        assertFalse(propertyEvent.wasMultiValue());
        assertNull(propertyEvent.getPreviousValue());
        assertNull(propertyEvent.getPreviousValues());
    }
View Full Code Here


                   + prop1.getPath(),
                   containsPath(listener, prop1.getPath()));


        assertTrue(propertyChangedEvent instanceof PropertyEvent);
        PropertyEvent propertyEvent = (PropertyEvent) propertyChangedEvent;

        assertEquals("prop1 modified content", propertyEvent.getCurrentValue());
        assertEquals(1, propertyEvent.getCurrentValues().size());
        assertEquals("prop1 modified content", propertyEvent.getCurrentValues().get(0));
        assertFalse(propertyEvent.isMultiValue());

        assertFalse(propertyEvent.wasMultiValue());
        assertEquals("prop1 content", propertyEvent.getPreviousValue());
        assertEquals(1, propertyEvent.getPreviousValues().size());
        assertEquals("prop1 content", propertyEvent.getPreviousValues().get(0));
    }
View Full Code Here

        Event propertyRemovedEvent = listener.getEvents().get(0);
        assertTrue("Path for removed property is wrong: actual=" + propertyRemovedEvent.getPath() + ", expected="
                   + propPath, containsPath(listener, propPath));

        assertTrue(propertyRemovedEvent instanceof PropertyEvent);
        PropertyEvent propertyEvent = (PropertyEvent) propertyRemovedEvent;

        assertEquals("prop1 content", propertyEvent.getCurrentValue());
        assertEquals(1, propertyEvent.getCurrentValues().size());
        assertEquals("prop1 content", propertyEvent.getCurrentValues().get(0));
        assertFalse(propertyEvent.isMultiValue());

        assertFalse(propertyEvent.wasMultiValue());
        assertNull(propertyEvent.getPreviousValue());
        assertNull(propertyEvent.getPreviousValues());

    }
View Full Code Here

        Event propertyAddedEvent = listener.getEvents().get(0);
        assertTrue("Path for added property is wrong: actual=" + propertyAddedEvent.getPath() + ", expected=" + propPath,
                   containsPath(listener, propPath));

        assertTrue(propertyAddedEvent instanceof PropertyEvent);
        PropertyEvent propertyEvent = (PropertyEvent) propertyAddedEvent;

        assertEquals("foo", propertyEvent.getCurrentValue());
        assertEquals(2, propertyEvent.getCurrentValues().size());
        assertEquals(Arrays.asList("foo", "bar"), propertyEvent.getCurrentValues());
        assertTrue(propertyEvent.isMultiValue());

        assertFalse(propertyEvent.wasMultiValue());
        assertNull(propertyEvent.getPreviousValue());
        assertNull(propertyEvent.getPreviousValues());
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.api.observation.PropertyEvent

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.