Hi all, I need to know why and when an AssertionFailedError occures is it beacuse of the way we do testing or some units need not be tested. or is it beacuse of the types of assertions we use (the wrong assertion at the wrong place) Thanks Siripa
A junit.framework.AssertionFailedError is thrown when an assertion fails. Basically it means that your code didn't behave like your test code expected it to behave. For example,
If you run the CalculatorTest, it will throw an AssertionFailedError because 'actual' was (5 + 3 = 8) instead of the expected (5 - 3 = 2).