Lines Matching refs:tc
182 for (TestCase tc : testCases) { in runTests()
183 System.out.println(tc.testName); in runTests()
185 runTest(tc); in runTests()
192 private void runTest(TestCase tc) throws Exception { in runTest() argument
195 Class<?> c = Class.forName(tc.testClass); in runTest()
203 if (m.getName().equals(tc.testMethodName)) { in runTest()
211 tc.testMethodName + " in class " + in runTest()
212 tc.testClass + " for test " + in runTest()
213 tc.testName); in runTest()
217 retValue = method.invoke(null, tc.values); in runTest()
219 retValue = method.invoke(method.getDeclaringClass().newInstance(), tc.values); in runTest()
221 if (tc.expectedException != null) { in runTest()
223 tc.testName); in runTest()
224 } else if (tc.expectedReturn == null && retValue != null) { in runTest()
226 tc.testName); in runTest()
227 } else if (tc.expectedReturn != null && in runTest()
228 (retValue == null || !tc.expectedReturn.equals(retValue))) { in runTest()
230 tc.expectedReturn + in runTest()
237 if (tc.expectedException == null) { in runTest()
240 exc.getCause().getClass().equals(tc.expectedException.getClass())) { in runTest()
242 } else if (!tc.expectedException.getClass().equals(exc.getClass())) { in runTest()
244 tc.expectedException.getClass().getName() + in runTest()