
jmock
逆风飞翔
我是一个简单的人,我喜欢技术,因为它可以让我感觉到成就感、感觉到快乐......
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
spring 配置junit 启动时出现 ClassNotFound警告
spring 配置junit 启动时出现 ClassNotFound警告: 警告: Failed to classload type while reading annotation metadata. This is a non-fatal error, but certain annotation metadata may be unavailable. java.lang.C原创 2014-04-14 15:39:32 · 8250 阅读 · 0 评论 -
(1)jmock测试入门
最近想玩玩JMock。 对着官方文档,想开始写个test case,不过让我郁闷的是官方文档上给的实例代码不完全 这个是官方的文档: 地址是:http://jmock.org/getting-started.html Getting Started In this simple example we are going to write a mock object原创 2014-04-09 15:25:15 · 1810 阅读 · 0 评论 -
(3)jmock测试入门
Returning Values from Mocked Methods Unless you explicitly specify otherwise, jMock will return an appropriate value from any methods that do not have a void return type. In most tests you will nee原创 2014-04-09 17:16:41 · 945 阅读 · 0 评论 -
(2)jmock测试入门
1. 如何校验expectations中的规则? 使用JMock时,一般会通过如下代码指定expectations。 private Mockery context = new Mockery(); context.checking(new Expectations() { { ... expectations go here ...原创 2014-04-09 15:38:15 · 1408 阅读 · 0 评论