HWDBTestCase12
来源:互联网 发布:图纸打印软件 编辑:程序博客网 时间:2024/06/11 03:58
public void runBare() throws Throwable
{
if (firstFlag)
{
setUp();
countTestMethod();
}
try
{
executeCount += 1;
runTest();
}
catch (Exception e)
{
tearDown();
throw e;
}
if (executeCount == testCount && lastFlag)
{
tearDown();
}
}
private void countTestMethod()
{
Method[] runMethod = getClass().getMethods();
for (int i = 0; i < runMethod.length; i++)
{
if (runMethod[i].getName().startsWith("test"))
{
testCount += 1;
}
}
}