Skip to content

Commit

Permalink
Update CODE_OF_CONDUCT.md and code.en.md about hamcrest (#21046)
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian authored Sep 20, 2022
1 parent 7fd8af6 commit 801bbc8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The following code of conduct is based on full compliance with [ASF CODE OF COND
- Without particular reasons, test cases should be fully covered.
- Every test case need precised assertion.
- Environment preparation codes should be separate from test codes.
- Only those that relate to junit `Assert`, hamcrest `CoreMatchers` and `Mockito` can use static import.
- Only those that relate to `Mockito`, junit `Assert`, hamcrest `CoreMatchers` and `MatcherAssert` can use static import.
- For single parameter asserts, `assertTrue`, `assertFalse`, `assertNull` and `assertNotNull` should be used.
- For multiple parameter asserts, `assertThat` should be used.
- For accurate asserts, try not to use `not`, `containsString` to make assertions.
Expand Down
2 changes: 1 addition & 1 deletion docs/community/content/involved/conduct/code.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ chapter = true
- 除去简单的 `getter /setter` 方法,以及声明 SPI 的静态代码,如:`getType / getOrder`,单元测试需全覆盖。
- 每个测试用例需精确断言。
- 准备环境的代码和测试代码分离。
- 只有 junit `Assert`,hamcrest `CoreMatchers`,Mockito 相关可以使用 static import。
- 只有 Mockito,junit `Assert`,hamcrest `CoreMatchers``MatcherAssert` 相关可以使用 static import。
- 单数据断言,应使用 `assertTrue``assertFalse``assertNull``assertNotNull`
- 多数据断言,应使用 `assertThat`
- 精确断言,尽量不使用 `not``containsString` 断言。
Expand Down
2 changes: 1 addition & 1 deletion docs/community/content/involved/conduct/code.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The following code of conduct is based on full compliance with [ASF CODE OF COND
- Test cases should be fully covered expect simply `getter /setter` methods, and declared static codes of SPI, such as: `getType / getOrder`.
- Every test case need precised assertion.
- Environment preparation codes should be separate from test codes.
- Only those that relate to junit `Assert`, hamcrest `CoreMatchers` and `Mockito` can use static import.
- Only those that relate to `Mockito`, junit `Assert`, hamcrest `CoreMatchers` and `MatcherAssert` can use static import.
- For single parameter asserts, `assertTrue`, `assertFalse`, `assertNull` and `assertNotNull` should be used.
- For multiple parameter asserts, `assertThat` should be used.
- For accurate asserts, try not to use `not`, `containsString` to make assertions.
Expand Down

0 comments on commit 801bbc8

Please sign in to comment.