Arrange-Act-Assert (AAA) は、テストを3つのフェーズに明確に構造化するパターンです:Arrange(セットアップ)、Act(アクション実行)、Assert(結果検証)。これにより、テストは読みやすく、組織的で、理解しやすくなります。
3つのフェーズ
ARRANGE → set up the test: create objects, prepare inputs, configure mocks, set state
ACT → perform the ACTION being tested (call the function/method under test)
ASSERT → verify the OUTCOME: check the result/behavior matches what's expected
→ A clear three-part structure for every test.
