I want to test this piece of block mainly in x != null
, is there a better way to assert this method in JUnit.
private void myorder()
{
if (x != null)
{
//some code
myorder(x.getDown());
System.out.print(r.getData() + " ");
myorder(x.getUp());
}
}
Here's what I've done so far:
@Test
assertFalse(x != null);