我正在使用Junit 4.我的整个程序工作正常。我正在尝试编写一个测试用例。但有一个错误...Java Junit测试问题
这里是非常基本的样本测试
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 我做错了或者他们改变了它:( 很抱歉,如果我不明白
有什么办法没有executre超检查?或调用函数等等?
TestAgnes是什么?它在第一个代码片段中没有提及。请清除你的问题。 – Bozho