r/javahelp • • Oct 07 '15

Help with JUnit

Hi. I am a new Java coder and I am trying to understand JUnit. How would I test an if statement in JUnit for all possibilities?

if ((board.getColumnHeight(xIndex) <= yIndex) && yIndex < 20) { move.setPiece(piece); }

6 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/firsthour Profressional developer since 2006 Oct 07 '15

You don't use heightLimit at all in that method.