1 15 package org.apache.tapestry.record; 16 17 import org.apache.hivemind.test.HiveMindTestCase; 18 19 25 public class TestPropertyChange extends HiveMindTestCase 26 { 27 public void testAccessors() 28 { 29 Object newValue = new Object (); 30 31 PropertyChangeImpl pc = new PropertyChangeImpl("componentPath", "property", newValue); 32 33 assertEquals("componentPath", pc.getComponentPath()); 34 assertEquals("property", pc.getPropertyName()); 35 assertSame(newValue, pc.getNewValue()); 36 } 37 38 public void testEquals() 39 { 40 PropertyChangeImpl pc1 = new PropertyChangeImpl("foo", "bar", "baz"); 41 PropertyChangeImpl pc2 = new PropertyChangeImpl("foo", "bar", "baz"); 42 PropertyChangeImpl pc3 = new PropertyChangeImpl(null, "bar", "baz"); 43 44 assertTrue(pc1.equals(pc2)); 45 assertTrue(pc1.equals(pc1)); 46 assertFalse(pc1.equals(pc3)); 47 assertFalse(pc1.equals(null)); 48 } 49 } | Popular Tags |