实践背景:
对数据库访问服务(DAS)的EJB进行单无测试
使用单元测试框架:arquillian+junit
基于 wildfly 实践3 --DAS服务开发 进行单元测试的补充
(转载请注明来源:cnblogs coder-fang)
- 在项目pom文件中加入相关依赖包,如下:
View Code
<!-- unit test --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-transaction-api</artifactId> <version>1.0.3.Final</version> </dependency>