Reputation: 1687
I want to write integration tests in a project which uses spring data neo4j version 4 (SDN4) in context of a spring boot application.
Does anybody know how to do that?
Upvotes: 2
Views: 1900
Reputation: 2181
Your integration tests can use a mocking framework such as Spring's MockMvc to avoid the need to start up a web container. If you don't want them to run in a web context at all you can use a different configuration file for testing that doesn't specify a session-scoped bean.
The integration tests in the SDN 4 codebase take both of these approaches.
Upvotes: 2
Reputation: 19373
The Cineasts example application for SDN4 has tests here: https://github.com/neo4j-examples/sdn4-cineasts/tree/master/src/test/java/org/neo4j/cineasts
Hope that helps.
Upvotes: 4