Conversation
andrus
left a comment
There was a problem hiding this comment.
Good job! My comments inside individual files are all cosmetic in nature. Let me add a few thoughts here:
- Can we combine the integration tests module with the main SB module? We do it for all the other Agrest modules (via
maven-failsafe-plugin). So all the existing classes with*ITextension are integration tests. Is it doable with Spring Boot? - We take some shortcuts with JAX-RS tests, because JAX-RS is used as an engine to test
agrest-cayenne. For SpringBoot I would like to have a bit more tests:- Let's add tests that are performing updates, and take EntityUpdate parameters. The docs are incomplete on this, but you will see some examples here, and of course in all the Cayenne tests that start with PUT and POST
- Let's add the tests showing the use of
AgRuntimeCustomizer
| @@ -0,0 +1 @@ | |||
| org.springframework.boot.autoconfigure.EnableAutoConfiguration=io/agrest.spring.starter.AgrestAutoConfiguration | |||
There was a problem hiding this comment.
I am not a Spring expert. So this is more of a question. Is it the correct syntax - io/agrest.spring.starter.... (the first separator in the class name is a slash, the rest are dots)?
There was a problem hiding this comment.
Maybe we can create a test for this condition
There was a problem hiding this comment.
Yep,I'll try. The problem here is that starter works as it is. But that syntax seems confusing for me too.
agrest-spring-boot-starter/src/main/java/io/agrest/spring/starter/exceptions/ApiError.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/io/agrest/spring/starter/exceptions/RestResponseEntityExceptionHandler.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/io/agrest/spring/starter/exceptions/RestResponseEntityExceptionHandler.java
Outdated
Show resolved
Hide resolved
|
Regarding integration tests - I've tried to do this in single module first, but it didn't work well. I think it's doable but it looks like the way it's done now is clearer in terms of configurations - now it's just a simple Spring Boot project with controllers and tests. Putting controllers in tests creates some hassle. I'll have another look here. Regarding more tests - yes, agreed. |
Add support for Spring Controllers.