Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE 2629] Improve readability of containsExactly #2638

Commits on Jul 13, 2022

  1. [ISSUE 2629] Improve readability of containsExactly

    Removes elementsDifferAtIndex() from assertContainsExactly() and re-use
    shouldContainExactlyWithDiffAssertionError() in order to show the actual
    and expected sets entirely. Making the differencesFound() check unnecessary.
    
    It also introduces a new shouldContainExactly() and checks for both
    the missing and unexpected diffs to be empty. Otherwise cases where the
    actual and expected only differ in order, result into logging of missing
    elements - which there are none.
    Giovds committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    a21e162 View commit details
    Browse the repository at this point in the history
  2. [ISSUE 2629] Add indices in containsExactly()

    Introduces an IndexedDiff to keep track of the diff at an index. If the
    lists are of the same length and contain the same elements, but are in
    not in the same order, print the indices - limited to 50 - where a
    mismatch occurred.
    Giovds committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    e1167da View commit details
    Browse the repository at this point in the history
  3. No need to import everything

    Giovds committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    d749eed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ba9631 View commit details
    Browse the repository at this point in the history