mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-11 10:43:10 +08:00
fix: clarify AssertJ vs JUnit assertion guidance in quarkus-tdd
Changed "Always use AssertJ" to "Prefer AssertJ for value checks" and documented the intended pattern: JUnit assertThrows/assertDoesNotThrow for exception lifecycle, AssertJ for value validation. This matches the actual code examples in the document.
This commit is contained in:
@@ -357,9 +357,10 @@ mvn jacoco:check
|
||||
- メッセージバリデーション付き例外シナリオに`assertThrows`を使用
|
||||
|
||||
### アサーション
|
||||
- JUnitアサーションの代わりに**常にAssertJ**(`assertThat`)を使用
|
||||
- 値チェックにはJUnitアサーションより**AssertJを優先**(`assertThat`)
|
||||
- 読みやすさのためにAssertJのfluent APIを使用
|
||||
- 例外: `assertThatThrownBy(() -> ...).isInstanceOf(...).hasMessageContaining(...)`
|
||||
- 例外: JUnitの`assertThrows`でキャプチャし、AssertJでメッセージを検証
|
||||
- 成功パス: JUnitの`assertDoesNotThrow`を使用
|
||||
|
||||
### イベント駆動テスト
|
||||
- `AdviceWith`と`MockEndpoint`でCamelルートをテスト
|
||||
|
||||
Reference in New Issue
Block a user