loomis / mockito-flex
simpler & better mocking for flex
$ hg clone http://bitbucket.org/loomis/mockito-flex/
News
03/02/2010 - Released RC2 of Mockito 1.3. It allows adding [Mock] metadata on the class level and smart type guessing from a field when autocreating mocks. More details here.
02/02/2010 - Released RC1 of Mockito 1.3. It comes with flex unit 4 integration and more.
A sample test with FlexUnit4:
For more details please refer release notes.
01/10/2009 - A new milestone available for download. It adds ordered verification.
30/08/2009 - A good starter by Shanon click here. Thanks for writing it!
12/08/2009 - Mockito 1.1 released. Please read release notes.
02/08/2009 - Release Candidate 1 is out. Feedback is welcome. Read release notes.
31/07/2009 - Integration test case for asunit is out there! Thanks James!
23/07/2009 - Mockito 1.01 released. Read release notes.
09/07/2009 - Added wiki with basic tutorial
08/07/2009 - Added some asdocs and basic tutorial. Check out the sources.
08/07/2009 - Started official mockito mailing list.
07/07/2009 - InfoQ mentions mockito-flex in it's article.
24/06/2009 - Mockito 1.0 released. Read release notes.
Milestones
M1.2.3 - Adds ordered verification:
Please note that you should not pass additional verifiers like times(n) to a verify function. If you do this the behavior is not well defined. I may need to change the API a little bit but for now just please don't use it.
M1.2.2 - Upgraded asmock to version 0.9
M1.2.1 - Adds support for calling original function for stubs:
Story
Mockito for Flex has been created during the Hack Day session in Sabre Airline Solutions in just two days. The main idea was to introduce a better and simpler testing for Flex to use with the Sabre CSS project. We made hacks on asmock framework and gave it a new face.
More details on motivations behind mockito can be found on Mockito for java site.
Many thanks go to David Endicott for letting us publish the results of the Hack Day under open source.
We would like to thank also Richard Szalay, Asmock author, for his excellent work.
How to drink it?
Please download the latest version from the download section, put the libraries in your lib folder.
If you are using flex unit for your unit tests, you can extend a MockitoTestCase and start writing your tests. For other unit testing frameworks please check the integrations wiki.
After that you can start verifying interactions:
Documentation and examples
To get familiar with the framework please take a look at the tutorial. There is asdoc available as well in the downloads section.
Also please check the additions and contributions that are not part of the framework yet but you may find them interesting.
Integrations with different unit testing frameworks are described here.
A good starter also can be found here
Releases
Who is the bartender?
This time flex mockito flavour is served to you by Kris Karczmarczyk and Szczepan Faber. But credits also go to all other contibutors of the mockito for java as we used and tried some of the new concepts.
How much is it?
This revision is from 2010-02-03 17:17
