From 4402e47553eba1ffebaa278d8444a002da0e3748 Mon Sep 17 00:00:00 2001 From: AlexisLeDain Date: Wed, 8 Apr 2026 22:40:39 +0200 Subject: [PATCH] fix: restore missing testPayload setup in zh-CN and ja-JP quarkus-tdd The Camel route test example was missing the testPayload field declaration, DocumentValidator mock, and @BeforeEach setup that exist in the English source, making the snippet invalid. --- docs/ja-JP/skills/quarkus-tdd/SKILL.md | 13 +++++++++++++ docs/zh-CN/skills/quarkus-tdd/SKILL.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/docs/ja-JP/skills/quarkus-tdd/SKILL.md b/docs/ja-JP/skills/quarkus-tdd/SKILL.md index 7be26f67..97e0bbbd 100644 --- a/docs/ja-JP/skills/quarkus-tdd/SKILL.md +++ b/docs/ja-JP/skills/quarkus-tdd/SKILL.md @@ -181,6 +181,19 @@ class BusinessRulesRouteTest { @InjectMock EventService eventService; + @InjectMock + DocumentValidator documentValidator; + + private BusinessRulesPayload testPayload; + + @BeforeEach + void setUp() { + // ARRANGE - テストデータ + testPayload = new BusinessRulesPayload(); + testPayload.setDocumentId(1L); + testPayload.setFlowProfile(FlowProfile.BASIC); + } + @Test @DisplayName("Should successfully publish message to RabbitMQ") void givenValidPayload_whenPublish_thenMessageSentToQueue() throws Exception { diff --git a/docs/zh-CN/skills/quarkus-tdd/SKILL.md b/docs/zh-CN/skills/quarkus-tdd/SKILL.md index 918957e8..3e12f505 100644 --- a/docs/zh-CN/skills/quarkus-tdd/SKILL.md +++ b/docs/zh-CN/skills/quarkus-tdd/SKILL.md @@ -181,6 +181,19 @@ class BusinessRulesRouteTest { @InjectMock EventService eventService; + @InjectMock + DocumentValidator documentValidator; + + private BusinessRulesPayload testPayload; + + @BeforeEach + void setUp() { + // ARRANGE - 测试数据 + testPayload = new BusinessRulesPayload(); + testPayload.setDocumentId(1L); + testPayload.setFlowProfile(FlowProfile.BASIC); + } + @Test @DisplayName("Should successfully publish message to RabbitMQ") void givenValidPayload_whenPublish_thenMessageSentToQueue() throws Exception {