From: shleh Date: Sat, 7 Aug 2004 15:27:30 +0000 (+0000) Subject: TestPool: will be used as the model for a tree content provider. X-Git-Url: http://secure.phpeclipse.com TestPool: will be used as the model for a tree content provider. --- diff --git a/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestCase.java b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestCase.java new file mode 100644 index 0000000..beac173 --- /dev/null +++ b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestCase.java @@ -0,0 +1,77 @@ +/* + * Created on Jul 31, 2004 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package net.sourceforge.phpeclipse.phpunit; + +/** + * @author Ali Echihabi + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class TestCase { + + /** + * @param testName + * @param testID + */ + public TestCase(String testName, String testID) { + + this.testName = testName; + this.testID = testID; + } + + static final String PASS = "PASS"; + static final String FAIL = "PASS"; + static final String ERROR = "PASS"; + + String testName; + String testID; + String verdict; + + /** + * @return + */ + public String getTestID() { + return testID; + } + + /** + * @return + */ + public String getTestName() { + return testName; + } + + /** + * @return + */ + public String getVerdict() { + return verdict; + } + + /** + * @param string + */ + public void setTestID(String string) { + testID = string; + } + + /** + * @param string + */ + public void setTestName(String string) { + testName = string; + } + + /** + * @param string + */ + public void setVerdict(String string) { + verdict = string; + } + +} diff --git a/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestPool.java b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestPool.java new file mode 100644 index 0000000..a4ba019 --- /dev/null +++ b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestPool.java @@ -0,0 +1,37 @@ +/* + * Created on Jul 31, 2004 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package net.sourceforge.phpeclipse.phpunit; + +import java.util.HashMap; + +/** + * @author Ali Echihabi + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class TestPool { + + private HashMap tests; + + public TestPool() { + + tests = new HashMap(); + } + + public void addTest(TestCase test) { + + tests.put(test.getTestID(), test); + + } + + public TestCase getTest(String testID) { + + return (TestCase) tests.get(testID); + } + +} diff --git a/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestSuite.java b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestSuite.java new file mode 100644 index 0000000..faced9d --- /dev/null +++ b/net.sourceforge.phpeclipse.phpunit/src/net/sourceforge/phpeclipse/phpunit/TestSuite.java @@ -0,0 +1,35 @@ +/* + * Created on Jul 31, 2004 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package net.sourceforge.phpeclipse.phpunit; + +import java.util.Vector; + +/** + * @author Ali Echihabi + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class TestSuite { + + private Vector testCases; + private String name; + private String id; + + public void addTestCase(TestCase test) { + + } + + public void removeTestCase(TestCase test) {} + + public boolean contains(TestCase test) { + return false; + } + + + +}