Examples of lastEvent()


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

     
        assertNull(m.getUserMetadata(name));
        assertNull(m.getUserMetadata(othername));
        pcl.assertEventCount(3);
        pclOther.assertEventCount(2);
        assertEquals("1", pclOther.lastEvent().getOldValue());
        assertEquals(null, pclOther.lastEvent().getNewValue());
    }
}
View Full Code Here

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

        assertNull(m.getUserMetadata(name));
        assertNull(m.getUserMetadata(othername));
        pcl.assertEventCount(3);
        pclOther.assertEventCount(2);
        assertEquals("1", pclOther.lastEvent().getOldValue());
        assertEquals(null, pclOther.lastEvent().getNewValue());
    }
}
View Full Code Here

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

        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.",
                2,
                pcl.eventCount());
        assertEquals("Old value is the buffered value.",
View Full Code Here

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

        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",
                pcl.lastEvent().getNewValue());
    }
View Full Code Here

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

        assertEquals("Old value is the buffered value.",
                "value1",
                pcl.lastEvent().getOldValue());
        assertEquals("New value is the modified value.",
                "VALUE1",
                pcl.lastEvent().getNewValue());
    }

    /**
     * Tests that a flush event fires a value change if and only if
     * the flushed value does not equal the buffered value.
View Full Code Here

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

                "Expected event count after ( " +
                oldValue + " -> " + newValue + ").",
                expectedEventCount,
                pcl.eventCount());
        if (eventExpected) {
            assertEquals("Event's old value.", oldValue, pcl.lastEvent().getOldValue());
            assertEquals("Event's new value.", newValue, pcl.lastEvent().getNewValue());
        }
    }
   
   
View Full Code Here

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

                oldValue + " -> " + newValue + ").",
                expectedEventCount,
                pcl.eventCount());
        if (eventExpected) {
            assertEquals("Event's old value.", oldValue, pcl.lastEvent().getOldValue());
            assertEquals("Event's new value.", newValue, pcl.lastEvent().getNewValue());
        }
    }
   
   
    // Helper Code ************************************************************
 
View Full Code Here

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

    newTestBean.setSimpleProperty("NewValue");
    TestPropertyChangeListener testPCL = new TestPropertyChangeListener(ValueModel.VALUE_PROPERTY);
    fm.getFormObjectHolder().addValueChangeListener(testPCL);
    fm.setFormObject(newTestBean);
    assertEquals(1, testPCL.eventCount());
    assertEquals(testBean, testPCL.lastEvent().getOldValue());
    assertEquals(newTestBean, testPCL.lastEvent().getNewValue());
  }

  public static class TestCommitListener implements CommitListener {
    int preEditCalls;
View Full Code Here

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

    TestPropertyChangeListener testPCL = new TestPropertyChangeListener(ValueModel.VALUE_PROPERTY);
    fm.getFormObjectHolder().addValueChangeListener(testPCL);
    fm.setFormObject(newTestBean);
    assertEquals(1, testPCL.eventCount());
    assertEquals(testBean, testPCL.lastEvent().getOldValue());
    assertEquals(newTestBean, testPCL.lastEvent().getNewValue());
  }

  public static class TestCommitListener implements CommitListener {
    int preEditCalls;
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.