2

JUnit 版本 4.11 Eclipse 开普勒

@Test
public void testName() throws Exception {
    Assert.assertEquals(1, 1);
}

java.lang.NoSuchMethodError: org.junit.Assert.assertEquals(JJ)

然而,没有生成编译错误,并且构建服务器上的构建没有报告错误。我觉得我的 Eclipse 以某种方式配置错误。

任何可以解决这个问题的 Eclipse 大师,非常感谢!

4

1 回答 1

4

我在项目类路径中有一个较旧的 JUnit。IDE 使用的是较新的 JUnit。项目中的 JUnit 已更新到 4.11,现在一切正常。

于 2013-08-30T18:27:54.043 回答