📄 basetestcase.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -