[java] Fix asserts for maps and sets by asolntsev · Pull Request #16808 · SeleniumHQ/selenium
The problem is that AssertJ's method `isEqualTo` doesn't always work for Sets and Maps because it assumes strict order of elements: 1. `assertThat(MAP).isEqualTo(Map.of(...))` 2. `assertThat(SET).isEqualTo(Set.of(...))` In both cases, we have to replace `isEqualTo` by `containsExactlyInAnyOrderEntriesOf` or similar method.
After the simplification, it became obvious that some of ByChainedTest tests don't really test anything. They create a bunch of lists (e.g. `elems345`) which are not used. And only the empty list of elements is loaded and asserted. Seems that this complex/misleading test logic in ByChainedTest was introduced in commit c4861b8 (some "patch from BenChambers"). Needs to be reviewed and fixed.
asolntsev
deleted the
fix/asserts-for-maps-and-sets
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters