我目前正在將一個將Spring類AbstractTransactionalSpringContextTests擴展到Spring 3的測試類。現在這個抽象類已被棄用,我應該使用AbstractJUnit38SpringContextTests。Spring 3替換爲isDisabledInThisEnvironment
測試類有它這個方法:
@Override
protected boolean isDisabledInThisEnvironment(String testMethodName)
{
// Test is only needed for bugfixing and development. Do not check in with this flag on false.
return true;
}
什麼是替代這種isDisabledInThisEnvironment方法?
這是'ConditionalTestCase'提供的一個特性,用於解決JUnit沒有「跳過測試」這個概念的問題,就像TestNG那樣。我認爲這不是*的替代品,在向JUnit4過渡期間可能會被忽略。 – skaffman 2010-03-25 18:16:48