在Maven项目中使用jMock

在Maven项目中使用JMock2.5.1,在pom.xml的<dependencies>...</dependencies>中加入以下片段:  
	<dependency>
		<groupId>org.jmock</groupId>
		<artifactId>jmock-junit4</artifactId>
		<version>2.5.1</version>
	</dependency>
	<dependency>
		<groupId>org.jmock</groupId>
		<artifactId>jmock-legacy</artifactId>
		<version>2.5.1</version>
	</dependency>


会自动将使用JMock需要的lib加入项目中,这些lib包括:
由第1段 <dependency> 引入:

jmock-2.5.1.jar
hamcrest-core-1.1.jar
hamcrest-library-1.1.jar
junit-dep-4.4.jar (与junit-4.4.jar重复,应该可以通过配置删除,配置方法暂时未知)

由第2段 <dependency>  引入(如果需要模拟具体类,则需要这项): 

jmock-legacy-2.5.1.jar
objenesis-1.0.jar

附官网的该项说明地址: http://www.jmock.org/maven.html

你可能感兴趣的:(html,maven,xml,JUnit)