basetestcase.java
来自「A Java web application, based on Struts 」· Java 代码 · 共 30 行
JAVA
30 行
package net.sf.irunninglog.junit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import junit.framework.TestCase;
public abstract class BaseTestCase extends TestCase {
protected static final Log LOG = LogFactory.getLog("UnitTests");
protected static final String STRING_FOO = "foo";
public BaseTestCase(String name) {
super(name);
}
protected void setUp() { }
protected void failTest() {
LOG.fatal("A test has failed.");
failTest(new Exception());
}
protected void failTest(Throwable ex) {
LOG.fatal("Failing a test due to an exception", ex);
fail();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?