Examples of eventCount()


Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        BufferedValueModel buffer = createDefaultBufferedValueModel();
        buffer.setValue("value1");
        TestPropertyChangeListener pcl = new TestPropertyChangeListener(ValueModel.VALUE_PROPERTY);
        buffer.addValueChangeListener(pcl);
       
        assertEquals("No initial change.", 0, pcl.eventCount());
        commit();
        assertEquals("First commit: no change.", 0, pcl.eventCount());
       
        buffer.setValue("value2");
        assertEquals("Setting a value: a change.", 1, pcl.eventCount());
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        TestPropertyChangeListener pcl = new TestPropertyChangeListener(ValueModel.VALUE_PROPERTY);
        buffer.addValueChangeListener(pcl);
       
        assertEquals("No initial change.", 0, pcl.eventCount());
        commit();
        assertEquals("First commit: no change.", 0, pcl.eventCount());
       
        buffer.setValue("value2");
        assertEquals("Setting a value: a change.", 1, pcl.eventCount());
        commit();
        assertEquals("Second commit: no change.", 1, pcl.eventCount());
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        assertEquals("No initial change.", 0, pcl.eventCount());
        commit();
        assertEquals("First commit: no change.", 0, pcl.eventCount());
       
        buffer.setValue("value2");
        assertEquals("Setting a value: a change.", 1, pcl.eventCount());
        commit();
        assertEquals("Second commit: no change.", 1, pcl.eventCount());
    }

    public void testCommitFiresChangeOnDifferentOldAndNewValues() {
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        assertEquals("First commit: no change.", 0, pcl.eventCount());
       
        buffer.setValue("value2");
        assertEquals("Setting a value: a change.", 1, pcl.eventCount());
        commit();
        assertEquals("Second commit: no change.", 1, pcl.eventCount());
    }

    public void testCommitFiresChangeOnDifferentOldAndNewValues() {
        BufferedValueModel buffer = createDefaultBufferedValueModel(
                new ToUpperCaseStringHolder());
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        TestPropertyChangeListener pcl = new TestPropertyChangeListener(ValueModel.VALUE_PROPERTY);
        buffer.addValueChangeListener(pcl);
        buffer.setValue("value1");
        assertEquals("One event fired",
                1,
                pcl.eventCount());
        assertEquals("First value set.",
                "value1",
                pcl.lastEvent().getNewValue());
        commit();
        assertEquals("Commit fires if the wrapped modifies the value.",
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

                "value1",
                pcl.lastEvent().getNewValue());
        commit();
        assertEquals("Commit fires if the wrapped modifies the value.",
                2,
                pcl.eventCount());
        assertEquals("Old value is the buffered value.",
                "value1",
                pcl.lastEvent().getOldValue());
        assertEquals("New value is the modified value.",
                "VALUE1",
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

       
        wrapped.setValue("new wrapped");
        buffer.setValue("new buffer");
        buffer.addValueChangeListener(pcl);
        revert();
        assertEquals("First flush changes value.", 1, pcl.eventCount());
       
        buffer.setValue(wrapped.getValue());
        assertEquals("Resetting value: no change.", 1, pcl.eventCount());
        revert();
        assertEquals("Second flush: no change.", 1, pcl.eventCount());
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        buffer.addValueChangeListener(pcl);
        revert();
        assertEquals("First flush changes value.", 1, pcl.eventCount());
       
        buffer.setValue(wrapped.getValue());
        assertEquals("Resetting value: no change.", 1, pcl.eventCount());
        revert();
        assertEquals("Second flush: no change.", 1, pcl.eventCount());

        buffer.setValue("new buffer2");
        assertEquals("Second value change.", 2, pcl.eventCount());
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        assertEquals("First flush changes value.", 1, pcl.eventCount());
       
        buffer.setValue(wrapped.getValue());
        assertEquals("Resetting value: no change.", 1, pcl.eventCount());
        revert();
        assertEquals("Second flush: no change.", 1, pcl.eventCount());

        buffer.setValue("new buffer2");
        assertEquals("Second value change.", 2, pcl.eventCount());
        wrapped.setValue("new wrapped2");
        assertEquals("Setting new wrapped value: no change.", 3, pcl.eventCount());
View Full Code Here

Examples of org.springframework.binding.support.TestPropertyChangeListener.eventCount()

        assertEquals("Resetting value: no change.", 1, pcl.eventCount());
        revert();
        assertEquals("Second flush: no change.", 1, pcl.eventCount());

        buffer.setValue("new buffer2");
        assertEquals("Second value change.", 2, pcl.eventCount());
        wrapped.setValue("new wrapped2");
        assertEquals("Setting new wrapped value: no change.", 3, pcl.eventCount());
        buffer.setValue(wrapped.getValue());
        assertEquals("Third value change.", 3, pcl.eventCount());
        revert();
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.