diff options
author | aclement <aclement> | 2005-10-27 10:27:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-10-27 10:27:16 +0000 |
commit | 81f8e0326c6db86ea236e281e8a58ac62d21a702 (patch) | |
tree | e7c86ab4101709ee22a31384a289101065dbff0c /tests/bugs150/pr113630/case2/BeanTestCase.java | |
parent | 29bcce87bdacd80a3609410f3e1bfe198c11d050 (diff) | |
download | aspectj-81f8e0326c6db86ea236e281e8a58ac62d21a702.tar.gz aspectj-81f8e0326c6db86ea236e281e8a58ac62d21a702.zip |
pr113630: testcode
Diffstat (limited to 'tests/bugs150/pr113630/case2/BeanTestCase.java')
-rw-r--r-- | tests/bugs150/pr113630/case2/BeanTestCase.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs150/pr113630/case2/BeanTestCase.java b/tests/bugs150/pr113630/case2/BeanTestCase.java new file mode 100644 index 000000000..3f41ba44a --- /dev/null +++ b/tests/bugs150/pr113630/case2/BeanTestCase.java @@ -0,0 +1,24 @@ + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +public class BeanTestCase implements PropertyChangeListener{ + + public void propertyChange(PropertyChangeEvent e){ + System.out.println("Property [" + e.getPropertyName() + "[ changed from " + + e.getOldValue() + " to " + e.getNewValue() ); + } + + public static void main(String [] argv) { + new BeanTestCase().testPropertyChange(); + } + + public void testPropertyChange(){ + Bean b = new Bean(); + b.addPropertyChangeListener( "name", this ); + b.setName( "Test" ); + if (!b.getName().equals("Test")) throw new RuntimeException(""); + b.setName( "Test1" ); + if (!b.getName().equals("Test1")) throw new RuntimeException(""); + } +} |