diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..6243f1c --- /dev/null +++ b/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..fa5c217 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + CollabUnit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/bin/uk/org/floop/collabunit/CollabRunner.class b/bin/uk/org/floop/collabunit/CollabRunner.class new file mode 100644 index 0000000..bd82423 --- /dev/null +++ b/bin/uk/org/floop/collabunit/CollabRunner.class Binary files differ diff --git a/bin/uk/org/floop/collabunit/CollabRunnerTest.class b/bin/uk/org/floop/collabunit/CollabRunnerTest.class new file mode 100644 index 0000000..93466e0 --- /dev/null +++ b/bin/uk/org/floop/collabunit/CollabRunnerTest.class Binary files differ diff --git a/bin/uk/org/floop/collabunit/DummyTest.class b/bin/uk/org/floop/collabunit/DummyTest.class new file mode 100644 index 0000000..f629943 --- /dev/null +++ b/bin/uk/org/floop/collabunit/DummyTest.class Binary files differ diff --git a/lib/junit.jar b/lib/junit.jar new file mode 100644 index 0000000..674d71e --- /dev/null +++ b/lib/junit.jar Binary files differ diff --git a/src/main/uk/org/floop/collabunit/CollabRunner.class b/src/main/uk/org/floop/collabunit/CollabRunner.class new file mode 100644 index 0000000..ff8d4c0 --- /dev/null +++ b/src/main/uk/org/floop/collabunit/CollabRunner.class Binary files differ diff --git a/src/main/uk/org/floop/collabunit/CollabRunner.java b/src/main/uk/org/floop/collabunit/CollabRunner.java new file mode 100644 index 0000000..43deff7 --- /dev/null +++ b/src/main/uk/org/floop/collabunit/CollabRunner.java @@ -0,0 +1,71 @@ +/* + * Created on Sep 7, 2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package uk.org.floop.collabunit; + +import junit.framework.Test; +import junit.framework.TestResult; +import junit.runner.BaseTestRunner; + +/** + * @author alex + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class CollabRunner extends BaseTestRunner { + + private TestResult results; + + /* (non-Javadoc) + * @see junit.runner.BaseTestRunner#testStarted(java.lang.String) + */ + public void testStarted(String testName) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see junit.runner.BaseTestRunner#testEnded(java.lang.String) + */ + public void testEnded(String testName) { + // TODO Auto-generated method stub + + } + + /** + * + */ + public CollabRunner() { + results = new TestResult(); + results.addListener(this); + } + /* (non-Javadoc) + * @see junit.runner.BaseTestRunner#testFailed(int, junit.framework.Test, java.lang.Throwable) + */ + public void testFailed(int status, Test test, Throwable t) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see junit.runner.BaseTestRunner#runFailed(java.lang.String) + */ + protected void runFailed(String message) { + // TODO Auto-generated method stub + + } + + /** + * @param test + * @return + */ + public boolean runTest(Test test) + { + test.run(results); + return results.wasSuccessful(); + } +} diff --git a/src/tests/uk/org/floop/collabunit/CollabRunnerTest.java b/src/tests/uk/org/floop/collabunit/CollabRunnerTest.java new file mode 100644 index 0000000..068717b --- /dev/null +++ b/src/tests/uk/org/floop/collabunit/CollabRunnerTest.java @@ -0,0 +1,28 @@ +/* + * Created on Sep 7, 2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package uk.org.floop.collabunit; + +import junit.framework.Test; +import junit.framework.TestCase; + +/** + * @author alex + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class CollabRunnerTest extends TestCase { + + public void testCollabRunner() { + CollabRunner runner = new CollabRunner(); + Test test = runner.getTest("uk.org.floop.collabunit.DummyTest"); + assertNotNull("Test shouldn't be null.", test); + assertTrue("Failed to run test which should always pass.", + runner.runTest(test)); + } + +} diff --git a/src/tests/uk/org/floop/collabunit/DummyTest.java b/src/tests/uk/org/floop/collabunit/DummyTest.java new file mode 100644 index 0000000..0fe6605 --- /dev/null +++ b/src/tests/uk/org/floop/collabunit/DummyTest.java @@ -0,0 +1,22 @@ +/* + * Created on Sep 7, 2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package uk.org.floop.collabunit; + +import junit.framework.TestCase; + +/** + * @author alex + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class DummyTest extends TestCase { + + public void testAlwaysPass() { + assertTrue(true); + } +}