Table of Contents

1 介绍

junit的介绍以及使用junit的好处可以参见百度百科1。在eclipse中自带了junit4,使用时可以使用内置的junit. jmockit主要是为了模拟一些类的行为,在单元测试中可以在没有某个对象的情况下,用jmockit生成,手册可以参见其官方文档2

2 使用&问题

  • jmockit的使用可以参考iteye上的系列博文3
  • 出现jmockit warning问题及解决
    Make sure jmockit.jar appears before any JUnit jar file in the classpath. Otherwise, it will shows warning:
    
    "WARNING: JMockit was initialized on demand, which may cause certain tests to fail;
    please check the documentation for better ways to get it initialized."
    

Date: 2012-05-14 16:34:38

Author: csophys

Org version 7.8.09 with Emacs version 23

Validate XHTML 1.0

相关文章:

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