Java Junit testing problem
Posted
by agazerboy
on Stack Overflow
See other posts from Stack Overflow
or by agazerboy
Published on 2010-03-21T16:29:50Z
Indexed on
2010/03/21
16:31 UTC
Read the original article
Hit count: 439
Hi All, I am using Junit 4. My whole program is working fine. I am trying to write a test case. But there is one error...
here is very basic sample test
public class di extends TestCase{
private static Records testRec;
public void testAbc() {
Assert.assertTrue(
"There should be some thing.",
di.testRec.getEmployee() > 0);
}
}
and when i run this it give me error that
fName can not be null
if i use super and do like this
public TestAgnes() {
super("testAbc");
}
it work all fine. It wasn't this before with JUnit 3.X am I doing wrong or they changed it :( Sorry if I am not clear
Is there any way to executre test without super? or calling functions etc. ?
© Stack Overflow or respective owner