mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-14 20:21:23 +08:00
fix: address PR review findings for quarkus skills
- Add missing objectMapper field to EventService example (quarkus-patterns) - Fix eventService.validate() → documentValidator.validate() API mismatch (quarkus-tdd) - Add DocumentValidator mock declaration in Camel route test (quarkus-tdd) - Update .opencode java-reviewer.txt to mention Quarkus alongside Spring Boot
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
You are a senior Java engineer ensuring high standards of idiomatic Java and Spring Boot best practices.
|
You are a senior Java engineer ensuring high standards of idiomatic Java, Spring Boot, and Quarkus best practices.
|
||||||
|
|
||||||
When invoked:
|
When invoked:
|
||||||
1. Run `git diff -- '*.java'` to see recent Java file changes
|
1. Run `git diff -- '*.java'` to see recent Java file changes
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ public class ProcessingService {
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class EventService {
|
public class EventService {
|
||||||
private final EventRepository eventRepository;
|
private final EventRepository eventRepository;
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
public void createSuccessEvent(Object payload, String eventType) {
|
public void createSuccessEvent(Object payload, String eventType) {
|
||||||
Event event = new Event();
|
Event event = new Event();
|
||||||
|
|||||||
@@ -265,6 +265,9 @@ class BusinessRulesRouteTest {
|
|||||||
@InjectMock
|
@InjectMock
|
||||||
EventService eventService;
|
EventService eventService;
|
||||||
|
|
||||||
|
@InjectMock
|
||||||
|
DocumentValidator documentValidator;
|
||||||
|
|
||||||
private BusinessRulesPayload testPayload;
|
private BusinessRulesPayload testPayload;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
@@ -371,8 +374,8 @@ class BusinessRulesRouteTest {
|
|||||||
});
|
});
|
||||||
camelContext.getRouteController().startRoute("document-processing");
|
camelContext.getRouteController().startRoute("document-processing");
|
||||||
|
|
||||||
// Mock validator to throw exception
|
// Mock validator bean to throw exception
|
||||||
when(eventService.validate(any())).thenThrow(new ValidationException("Invalid document"));
|
when(documentValidator.validate(any())).thenThrow(new ValidationException("Invalid document"));
|
||||||
|
|
||||||
// ACT
|
// ACT
|
||||||
producerTemplate.sendBody("direct:process-document", testPayload);
|
producerTemplate.sendBody("direct:process-document", testPayload);
|
||||||
|
|||||||
Reference in New Issue
Block a user