Issue Details (XML | Word | Printable)

Key: FEST-228
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Ruiz
Reporter: Alex Ruiz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FEST

Error message when comparing Strings is not consistent between JUnit and TestNG

Created: 02/Oct/09 01:20 AM   Updated: 02/Oct/09 01:34 AM   Resolved: 02/Oct/09 01:34 AM
Return to search
Component/s: Assert
Affects Version/s: FEST-Assert 1.1
Fix Version/s: FEST-Assert 1.2

Time Tracking:
Not Specified


 Description  « Hide

If JUnit is present, FEST-Assert creates a ComparisonFailure instead of an AssertionError. In this case, the error message is formatted as follows:

A Test expected:<[Yoda]> but was:<[Luke]>

but it is expected to be:

[A Test] expected:<'Yoda'> but was:<'Luke'>


Alex Ruiz added a comment - 02/Oct/09 01:33 AM

I just found out that ComparisonFailure adds brackets to the expected and actual values to indicate the differences between these two values.


Alex Ruiz added a comment - 02/Oct/09 01:34 AM

The expected error message when JUnit is present should be:

[A Test] expected:<'[Yoda]'> but was:<'[Luke]'>