[quote]Yes but use of JUnit is highly recommended. It’s the integration into build systems and IDEs and overall standardization that JUnit gives you that makes it so useful.
[/quote]
yes, I fully agree, I use it myself! I was just making an example to describe the concept …
There’s also TestNG (testng.org) . It’s not much different from JUnit but it has a few more nifty features, like the @DataProvider annotation which declares a source for parameters to your test methods:
@Test(dataProvider="objects")
public void testEquals(Object a, Object b)
{
return a.equals(b);
}
@DataProvider(name="objects")
public Object[][] getObjects()
{
Object a = new String("");
Object b = new String("");
return new Object[][] {{a,b}};
}
TestNG also comes with an eclipse plugin.
JUst asking… when we are packaging up all our class files, is it recommended to place our Junit files in it as well? Cause I am not sure if the next person who takes over will generate his/her own files.
Cheers!