HI James,
"assertTrue()" doesn't have an "actual" argument -- it accepts a boolean, and the test passes if the boolean is true; so your assertTrue() call would just look like:
assertTrue("Code doesn't belong in group", MyHelper.isValidCode(validCodeGroup[i]);
There are a few other things you would test: first, test that a bunch of non-valid codes return false -- i.e., define another array "invalidCodeGroup" and then try
assertFalse("Code doesn't belong in group", MyHelper.isValidCode(invalidCodeGroup[i]);
I'd also test lower-case valid codes, to make sure the method returns "true" for them too.
Finally, you'll probably want to test what happens if you pass in an empty
string (should return false) and what happens if you pass in null (should return false, I'd say, but the actual method will throw a NullPointerException, which I think should be fixed.)