dah*_*ron 4 junit kotlin junit5
我在 Kotlin 项目中使用 JUnit 5 并观察到与文档不匹配的行为。在@ExtendWith测试类上使用多个注释时,我收到以下错误:
Repeatable annotations with non-SOURCE retention are not yet supported

在ExtensionJUnit 文档的部分中,这被列为有效选项。
我正在使用 Kotlin 1.3.10 和 JUnit 5.3.2
为什么我无法@ExtendWith在我的测试类上重复注释?
Kotlin 尚不支持可重复注释。但是,您可以使用扩展注释:
@Extensions(
ExtendWith(...),
ExtendWith(...)
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3192 次 |
| 最近记录: |