我正在使用 Junit 4。我的整个程序运行良好。我正在尝试编写一个测试用例。但是有一个错误...
这是非常基本的样本测试
public class di extends TestCase{
private static Records testRec;
public void testAbc() {
Assert.assertTrue(
"There should be some thing.",
di.testRec.getEmployee() > 0);
}
}
当我运行它时,它给了我错误
fName can not be null
如果我使用超级并且这样做
public TestA() {
super("testAbc");
}
一切正常。在 JUnit 3.X 之前不是这样我做错了还是他们改变了它:( 抱歉,如果我不清楚
有没有办法在没有超级的情况下执行测试?或调用函数等?