Update of /cvsroot/mockobjects/no-stone-unturned/src/nostone/junitrunner
In directory usw-pr-cvs1:/tmp/cvs-serv1949/src/nostone/junitrunner
Modified Files:
Tasks.java SwingRunnerTest.java
Log Message:
testCreateGui
Index: Tasks.java
===================================================================
RCS file: /cvsroot/mockobjects/no-stone-unturned/src/nostone/junitrunner/Tasks.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Tasks.java 17 Aug 2002 20:26:06 -0000 1.1
+++ Tasks.java 17 Aug 2002 20:27:21 -0000 1.2
@@ -1,7 +1,7 @@
package nostone.junitrunner;
public class Tasks {
- // TODO Open GUI, close
+ // Open GUI, close
// TODO Hardcoded testcase, one passing test, show green bar, show test counts
// TODO Hardcoded testcases, two passing test, show green bar, show test counts
// TODO Hardcoded testcase, one failing test, show red bar, show test counts, failure message
Index: SwingRunnerTest.java
===================================================================
RCS file: /cvsroot/mockobjects/no-stone-unturned/src/nostone/junitrunner/SwingRunnerTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SwingRunnerTest.java 17 Aug 2002 20:26:06 -0000 1.1
+++ SwingRunnerTest.java 17 Aug 2002 20:27:21 -0000 1.2
@@ -12,13 +12,14 @@
import javax.swing.*;
public class SwingRunnerTest extends TestCase {
+ private SwingRunner runner = new SwingRunner();
+
public SwingRunnerTest(String name) {
super(name);
}
public void testCreateGui() {
final ExpectationCounter closingCalls = new ExpectationCounter("window closing");
- SwingRunner runner = new SwingRunner();
runner.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
@@ -26,9 +27,20 @@
}
});
- ((JButton) findNamedComponent(runner, "quit")).doClick();
+ ((JButton) find("quit")).doClick();
closingCalls.verify();
+ }
+
+
+ public void testOnePassingTest() {
+
+
+
+ }
+
+ private Component find(String name) {
+ return findNamedComponent(runner, name);
}
private Component findNamedComponent(final Container container, final String name) {
|