Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7Jbw5CxUQ13D7gn25
20 lines
742 B
Plaintext
20 lines
742 B
Plaintext
@WebMvcTest(BookController.class) with @MockitoBean BookService
|
|
|
|
GET /api/books/1 -> 200 {"isbn":"9780134685991","title":"Effective Java","author":"Joshua Bloch","price":"INR 499.00","published_on":"2018-01-06"}
|
|
GET /api/books/99 -> 404 {"detail":"No book with id 99","instance":"/api/books/99","status":404,"title":"Book not found"}
|
|
|
|
beans in this context:
|
|
BookController (@RestController)=yes
|
|
ApiExceptionHandler (@ControllerAdvice)=yes
|
|
PriceJson (@JacksonComponent)=yes
|
|
MockMvc=yes
|
|
JsonMapper (Jackson 3)=yes
|
|
BookService (@Service)=yes
|
|
BookRepository (Spring Data)=no
|
|
EntityManagerFactory=no
|
|
DataSource=no
|
|
RestClient.Builder=no
|
|
IsbnLookupClient (@Component)=no
|
|
AuditLogger (@Component)=no
|
|
bean definitions=126
|