spring - 如何使用 JUnit 5(在 Kotlin 中)设置 Spring Data Neo4j 集成测试?
问题描述
Web 上使用 Neo4j 进行 Spring 集成测试的大多数示例仍然在 JUnit 4 上,并使用 Neo4jRule。
我们如何为 Neo4j + Spring + JUnit 5 创建设置?
解决方案
如果您在嵌入式上进行测试,请使用带有简单 Spring 配置的测试工具。
这里有些例子:
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
我会关注上面的 ^^ 这和测试容器将是我们前进的方向。
注意:@Neo4jExtension 主要由核心团队内部使用,不推荐用于一般用途。
推荐阅读
- scala - scala 3 的卡利班联盟
- c# - 在视图中显示嵌入了 aspx 代码的 html
- vue.js - 如何从我的 nuxt js 组件中的 node_modules 文件夹动态加载 svg 图标?
- java - 错误:对象无法转换为 TreeNode 类型(在函数中传递时出现堆栈错误) LeetCode 上关于树的问题
- emacs - 在 Doom Emacs 之前加载 Vanilla Emacs
- c - 应转换说明符“%%”匹配空格
- android - 按当前日期过滤的 Realm Flowable 查询
- python-3.x - 获取其他列中没有特定值的 ID
- javascript - 我可以使用 @nuxtjs/firebase 模块访问 subscribeToTopic 吗?
- sshd - sshd 连接问题:通过 [ip] 端口 x [preauth] 重置连接