How do I set up a Spring Data Neo4j integration test with JUnit 5 (in Kotlin)?

前端 未结 1 1232
耶瑟儿~
耶瑟儿~ 2021-01-23 09:10

Most examples around the Web for doing Spring integration tests with Neo4j are still on JUnit 4, and use the Neo4jRule.

How do we create a setup for Neo4j + Spring + JUn

相关标签:
1条回答
  • 2021-01-23 09:50

    If you are testing on embedded, please use the Test Harness with a simple Spring Configuration.

    Here are some examples:

    https://medium.com/neo4j/testing-your-neo4j-based-java-application-34bef487cc3c

    https://github.com/michael-simons/neo4j-sdn-ogm-tips/tree/master/examples/using-the-test-harness https://github.com/michael-simons/neo4j-sdn-ogm-tips/tree/master/examples/using-testcontainers

    https://github.com/neo4j/neo4j-java-driver-spring-boot-starter/tree/master/examples/testing-with-neo4j-harness

    I would have an eye on the above ^^ This and test containers will be our way forward.

    Note: The @Neo4jExtension is mostly used internally by the core team and not recommended for general use.

    0 讨论(0)
提交回复
热议问题