mockito
-
Mockito really cleans up the unit test by not requiring expectations .
Mockito真的不需要期望行为,这简化了单元测试。
-
Other useful features of Mockito include
Mockito的其他有用的特性包括
-
Getting started with Mockito is as simple as adding a JAR file to your classpath .
上手Mockito就如同将一个JAR文件加到classpath中一样简单。
-
Mockito is a mocking framework for Java .
Mockito是一个针对Java的mocking框架。
-
Lack of expectations is a big win , as software developer Hamlet D'Arcy , a Mockito user , explains on his blog
正如Mockito用户、软件工程师HamletD'Arcy在其博客中所说,无需期望行为(expectations)是个大成就
-
We use SolrJ , the Java Solr library , to talk to Apache Solr , Joda-Time for date time manipulation and Mockito for unit test mocking ( this worked fine with Scala code too ) .
用Joda-time来做时间处理,用Mockito做mock(这个类库也能跟Scala代码协同工作)。