Sam Parson wrote:However it looks like I won't be able to directly test private methods. I can only write a testcase using a protected method that calls that private method in the same class.
salvin francis wrote:You could consider "has", "can", "contains" etc..
I hope my post does not raise a lot of eyebrows
Nicholas Mercurio wrote:I have heard that it is outdated, unfortunately, my JavaEE class requires it.
If I have the session.getAttribute() tags in their respective if statements, won't they not run if the particular if isn't entered? For example, if itemExists(rs) returns true, the else if will not run, thus not setting the invalidCode attribute? I do see what you're speaking of within the JSP, but not sure how else I would validate the 2nd else if statement checking if invalidCode is true or false if I don't getAttribute before running the elseif.