3
是否有人知道为什么@Test注释方法其继承从Scala的特质是没有发现由JUnit 4测试亚军?它给了我“没有找到JUnit测试”。@Test方法没有找到
class FooTests extends BarTesting
但是,以下修改的作品?
import junit.framework.TestCase
class FooTests extends TestCase with BarTesting
在斯卡拉特质BarTesting我定义了具有以下签名的方法。
@Test
final def testBar() {
// ...
}
你是如何运行你的测试?这可能是IDE而不是测试运行者的问题:http://www.manning-sandbox.com/thread.jspa?messageID=62087&tstart=0。 –
嗨,Aaron,我尝试通过Eclipse JEE Indigo Release和Scala IDE 2.0.0.beta9一起运行它。 –