我在我的项目中实现了 JUnit。我使用 org.junit.experimental.theories.Theories 发现了几个很好的特性。
其中一个优势是我可以很好地将数据和测试用例分开。
JUnit 版本 4.12
现在的问题是这些类是“实验”包的一部分。这是否意味着在未来的版本中可能无法使用此功能? [这个问题可能不是 SO 的正确问题,但它是解决方案的决策点]
谢谢。
最佳答案
对我来说这是个好问题。由于 FAQ 和 JUnit 的 Wiki 没有明确提及 experimental
包。对于 Theories
,它们至少从五年(可能更长)开始就是一部分。所以我不希望这个功能会消失。可能发生的情况是这些包的 API 发生了变化。
编辑 至少在JUnit 5 user guide提到了类似的注释 ( @API(Experimental) )。
Experimental Intended for new, experimental features where we are looking for feedback. Use this element with caution; it might be promoted to Maintained or Stable in the future, but might also be removed without prior notice, even in a patch.
关于java - JUnit : org. junit.experimental.Theories,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37854269/