FEST
  1. FEST
  2. FEST-228

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

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: FEST-Assert 1.1
    • Fix Version/s: FEST-Assert 1.2
    • Component/s: Assert
    • Labels:
      None
    • Number of attachments :
      0

      Description

      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'>
      

        Activity

        Hide
        Alex Ruiz added a comment -

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

        Show
        Alex Ruiz added a comment - I just found out that ComparisonFailure adds brackets to the expected and actual values to indicate the differences between these two values.
        Hide
        Alex Ruiz added a comment -

        The expected error message when JUnit is present should be:

        [A Test] expected:<'[Yoda]'> but was:<'[Luke]'>
        
        Show
        Alex Ruiz added a comment - The expected error message when JUnit is present should be: [A Test] expected:<'[Yoda]'> but was:<'[Luke]'>

          People

          • Assignee:
            Alex Ruiz
            Reporter:
            Alex Ruiz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: