环境:
您好(测试课程)
import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class Hi {
@Test
public void hola(){
assertTrue(true);
}
}
的pom.xml
...
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.17</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-processing</artifactId>
<version>2.17</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
...
答案 0 :(得分:1)
对于Maven projekt,测试类必须在src / test / java中,而不是src / main / java。