forked from apache/calcite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CALCITE-5726] Canonize use of Hamcrest matchers in test code
Use matchers for Object.toString(), Collection.size(), Map.size(): * assertThat(map.size(), is(n)) → assertThat(map, aMapWithSize(n)); * assertThat(list.size(), is(n)) → assertThat(map, IsCollectionWithSize.hasSize(n)); * assertThat(o.toString(), is(s)) → assertThat(o, hasToString(s)); * assertThat(o.toString(), equalTo(s)) → assertThat(o, hasToString(s)); If there are multiple equivalent methods in Hamcrest, use the ones in CoreMatchers or Matchers: * CoreMatchers.is rather than Is.is * Matchers.hasToString rather than HasToString.hasToString * Matchers.hasSize rather than IsCollectionWithSize.hasSize * Matchers.aMapWithSize rather than IsMapWithSize.aMapWithSize Require static import of methods in CoreMatchers and Matchers. Autostyle now converts import org.hamcrest.CoreMatchers; import org.hamcrest.Matchers; to import static org.hamcrest.CoreMatchers.anything; import static org.hamcrest.Matchers.allOf; and hopefully the user will take the hint.
- Loading branch information
1 parent
379f41d
commit 0b819df
Showing
91 changed files
with
1,285 additions
and
1,178 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.