Lines Matching full:test
10 * It runs a collection of test cases. Here is an example using
11 * the dynamic test definition.
24 * starting with "test" that take no arguments.
26 * @see Test
28 public class TestSuite implements Test {
30 private Vector<Test> fTests= new Vector<Test>(10);
50 * starting with "test" as test cases to the suite.
70 while (Test.class.isAssignableFrom(superClass)) {
89 * Adds a test to the suite.
91 public void addTest(Test test) {
92 fTests.addElement(test);
108 addTest(warning("Test method isn't public: "+m.getName()));
119 static public Test createTest(Class theClass, String name) {
126 Object test;
129 test= constructor.newInstance(new Object[0]);
130 if (test instanceof TestCase)
131 ((TestCase) test).setName(name);
133 test= constructor.newInstance(new Object[]{name});
136 return(warning("Cannot instantiate test case: "+name+" ("+exceptionToString(e)+")"));
140 return(warning("Cannot access test case: "+name+" ("+exceptionToString(e)+")"));
142 return (Test) test;
157 * Counts the number of test cases that will be run by this test.
162 Test test= (Test)e.nextElement();
163 count= count + test.countTestCases();
190 return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
200 Test test= (Test)e.nextElement();
201 runTest(test, result);
205 public void runTest(Test test, TestResult result) {
206 test.run(result);
210 * Returns the test at the given index
212 public Test testAt(int index) {
213 return (Test)fTests.elementAt(index);
248 * test suites have a name and this method
256 * Returns a test which will fail and log a warning message.
258 private static Test warning(final String message) {