这是我目前的测试片段:
<packaging>eclipse-test-plugin</packaging>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>com.springsource.org.junit</artifactId>
<version>4.7.0</version>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)
使用以下插件配置:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.equinox.ds</artifactId>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.apache.felix.gogo.shell</artifactId>
</dependency>
</dependencies>
<providerHint>junit47</providerHint>
<argLine>-ea</argLine>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我使用POM优先方法来解决依赖关系:
<pomDependencies>consider</pomDependencies>
Run Code Online (Sandbox Code Playgroud)
上面的JUnit版本是我能找到的唯一版本,它被打包为一个包.
问题是我找不到匹配,允许我在一个片段中一起使用JUnit和Mockito.
我的常见问题是:
我想避免从JUnit,Hamcrest和Mockito创建我自己的包.