实践背景:

对数据库访问服务(DAS)的EJB进行单无测试

使用单元测试框架:arquillian+junit

基于 wildfly 实践3 --DAS服务开发 进行单元测试的补充

 (转载请注明来源:cnblogs coder-fang)

 

  1. 在项目pom文件中加入相关依赖包,如下:
    <!-- 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>
    View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-08-13
  • 2021-11-07
  • 2022-01-10
  • 2022-01-14
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-04-10
  • 2022-02-14
  • 2022-12-23
  • 2022-01-26
  • 2021-08-20
相关资源
相似解决方案