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

Update CODE_OF_CONDUCT about assertThat #21046

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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