Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Hi guys im doing Junittesting and im having a problem. Im using Eclipse which can also allow the Junit to copy the testing in a text doc. but the problem is ive been using if's which is a probelm because to save the Junit test in text document I have to use assertEquals instead of if. but im not sure how i would use it. Can sumone show me an example of how i would use the assertEquals in my current statement below. Thanks aot.
For JUnit, you'd want to say assertTrue() rather than assert. Otherwise I agree with Mark. There's really no way to do this with assertEquals(). If you do this sort of thing more than once or maybe twice, I'd create a custom assert statement (or two) that can be reused in other tests:
It's a bit more work to put diagnostic info into the error messages, but it's often worth it, in my opinion. [ October 17, 2006: Message edited by: Jim Yingst ]