[Buix-commits] r580 - in trunk/lutinjaxx: core/src/test/java/jaxx/runtime runtime/src/main/java/jaxx/runtime
Author: tchemit Date: 2008-04-18 20:13:07 +0000 (Fri, 18 Apr 2008) New Revision: 580 Added: trunk/lutinjaxx/runtime/src/main/java/jaxx/runtime/UtilTest.java Removed: trunk/lutinjaxx/core/src/test/java/jaxx/runtime/UtilTest.java Log: test at good place Deleted: trunk/lutinjaxx/core/src/test/java/jaxx/runtime/UtilTest.java =================================================================== --- trunk/lutinjaxx/core/src/test/java/jaxx/runtime/UtilTest.java 2008-04-18 20:12:46 UTC (rev 579) +++ trunk/lutinjaxx/core/src/test/java/jaxx/runtime/UtilTest.java 2008-04-18 20:13:07 UTC (rev 580) @@ -1,25 +0,0 @@ -package jaxx.runtime; - -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; - -public class UtilTest extends junit.framework.TestCase { - private int count; - - - public void testGetEventListener() { - count = 0; - DocumentListener listener = (DocumentListener) jaxx.runtime.Util.getEventListener(javax.swing.event.DocumentListener.class, this, "incCount"); - listener.insertUpdate(null); - assertEquals(count, 1); - DocumentListener listener2 = (DocumentListener) jaxx.runtime.Util.getEventListener(javax.swing.event.DocumentListener.class, this, "incCount"); - listener2.removeUpdate(null); - assertEquals(count, 2); - //assertTrue("Received two different event listeners despite using identical parameters", listener == listener2); - } - - - public void incCount(DocumentEvent e) { - count++; - } -} \ No newline at end of file Copied: trunk/lutinjaxx/runtime/src/main/java/jaxx/runtime/UtilTest.java (from rev 579, trunk/lutinjaxx/core/src/test/java/jaxx/runtime/UtilTest.java) =================================================================== --- trunk/lutinjaxx/runtime/src/main/java/jaxx/runtime/UtilTest.java (rev 0) +++ trunk/lutinjaxx/runtime/src/main/java/jaxx/runtime/UtilTest.java 2008-04-18 20:13:07 UTC (rev 580) @@ -0,0 +1,25 @@ +package jaxx.runtime; + +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; + +public class UtilTest extends junit.framework.TestCase { + private int count; + + + public void testGetEventListener() { + count = 0; + DocumentListener listener = (DocumentListener) jaxx.runtime.Util.getEventListener(javax.swing.event.DocumentListener.class, this, "incCount"); + listener.insertUpdate(null); + assertEquals(count, 1); + DocumentListener listener2 = (DocumentListener) jaxx.runtime.Util.getEventListener(javax.swing.event.DocumentListener.class, this, "incCount"); + listener2.removeUpdate(null); + assertEquals(count, 2); + //assertTrue("Received two different event listeners despite using identical parameters", listener == listener2); + } + + + public void incCount(DocumentEvent e) { + count++; + } +} \ No newline at end of file
participants (1)
-
tchemit@users.labs.libre-entreprise.org