首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > easystub存根框架-一个简单的java

easystub存根框架-一个简单的java

资 源 简 介

EasyStub is a simple stubbing framework for Java. It was inspired by the EasyMock framework. EasyMock is great for mocking, but a little verbose for my tastes when using it for stubbing classes. EasyStub aims to fix that! With EasyStub, much of the syntax is like EasyMock. You create a stub by calling: EasyStub.createStub(ClassToStub.class); and register a stub return like: EasyStub.stub(stubInstance.aMethodOnClass()).withValue("a value to return"); Unlike EasyMock, no replaying or verifying of stubs takes place - there is no need. The stub also behaves as if you had created a stub class using an IDE - all methods return default values (null for object return types, false for boolean types and 0 for numeric primitive types), or you can throw exceptions if you want to be safe! EasyStub also supports capturing of method arguments. Documentation on how to use EasyStub can be found on our HowT

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 杨波 11小时前 成为了本站会员

  • ZS 12小时前 成为了本站会员

  • . 1天前 成为了本站会员

  • 奋斗 1天前 成为了本站会员

  • 1天前 成为了本站会员

  • 一天不玩浑身难受 2天前 成为了本站会员

  • Aloha 2天前 成为了本站会员

  • 嘻嘻嘻 2天前 成为了本站会员

  • maihaoweilai 2天前 成为了本站会员

  • 紫麟鹿 2天前 成为了本站会员