|
Project Information
Featured
Links
|
News2011-10-16 - Release 0.6.0 - Removed option to add extra interfaces on mocks.
- Added utility method assertThrows. Works on both mocks and regular objects.
- Spy now works automatically on final, anonymous classes and proxy classes as long as there exists an interface to spy through.
- Added chaining of thenReturn / thenThrows / thenAnswer when stubbing.
- Fixed deep mock concurrency bug.
- Fixed bug with wrong exception being thrown for spies.
2011-01-21 - Release 0.5.1 - Replaced the guice dependency with a much lighter gentyref dependency.
- Added more versatile verification modes.
- Added stubbing of all methods on a mock.
- Implemented support for timeout.
- when ... throws now rejects invalid exceptions.
- when ... throws now creates a new exception instance for each invocation.
- Removed MockContext
Release 0.5 - Added support for deep mocking with generics.
- Filtering out toString calls in invocations.
- Added implementation of when(mock.foo(...)).thenReturn/Answer/Throw()
Release 0.4 - Fixed bug with verifying maps
- Added handling of vararg methods
- Fixed bug with using mocks with protected methods
- Added first implementation of Aliases
Release 0.3.2 - Added default behaviour of returning collection objects (Iterable, List, Set, Map) when possible.
For the same method parameters, the same object will be returned.
- Moved all stub methods to Mockachino from MockContext.
- Fixed bug where equals failed when using different number types.
Release 0.3.1 - Changed behaviour of deep mock handler to remember arguments
- Added detection of incorrect verification usage on the form: verify().on(mock).foo().bar(); instead of verify().on(mock.foo()).bar();
2010-03-11 - Release 0.3 - Added support for @Mock and @Spy annotations
- Included optional support for Objenesis, which means support for mocking concrete classes without calling constructors
2010-02-19 - Release 0.2 - Added support for stubbing / verifying: equals, hashCode, toString
- Implemented a default answer for deep mocks
- Added MockPoint and between-operator.
- Implemented quick mocks (does not store stacktrace)
- Added mock settings
- Added support for mocking multiple interfaces on the same mock
- eq-matcher now supports comparing arrays by value (including nested arrays)
2010-02-06 - Release 0.1. IntroductionMockachino is a mocking framework for Java. It is very similar in usage to Mockito. See http://krkadev.blogspot.com/2010/02/mockito-vs-mockachino.html for a detailed comparison of features. Getting started- Download the latest featured full jar
- Put it in your development classpath
- See GettingStarted for examples on how to write tests using Mockachino.
Or for maven users: <dependency>
<groupId>se.mockachino</groupId>
<artifactId>mockachino</artifactId>
<version>0.6.0</version>
<scope>test</scope>
</dependency>ContactMockachino is still in early development but don't let that fool you. It's already quite stable and useable. Please try it out and report any feature suggestions or problems you have with it. Add your suggestion to the issue tracker or just email me at kristofer.karlsson@gmail.com
|