Java maven junit 4.5中没有org.junit.test包
我对junit版本4.5有一个maven依赖项,希望使用@test Announcation,但不能,因为工件中没有org.junit.test包。为什么会这样?我如何将@test与maven工件一起使用?完全限定的类是Java maven junit 4.5中没有org.junit.test包,java,maven,junit,Java,Maven,Junit,我对junit版本4.5有一个maven依赖项,希望使用@test Announcation,但不能,因为工件中没有org.junit.test包。为什么会这样?我如何将@test与maven工件一起使用?完全限定的类是org.junit.test。它肯定在那里 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version&g
org.junit.test
。它肯定在那里
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
</dependency>
它被称为
@Test
,而不是@Test
。没有包org.junit.Test,而是注释org.junit.Test。
import org.junit.Assert;
import org.junit.Test;
public class ThisIsATest {
@Test
public void method() {
Assert.assertTrue("OMG test!", true);
}
}