Tuesday, June 26, 2007
Amock 9.6
1. Features
With Amock, you
Can mock static method and constructor.
- You can unit test with singleton.
Can create mock object of a class which have only private constructor.
Can create mock instance of interface and normal class instance.
Can create mock object without any parameter even if the class does not have default constructor.
- You don’t need to create expensive object just for mock constructor.
Can access private method and attribute easily.
Can mock private and protected method.
Can use argument checker (argument matcher 'eq(). any()...') only where it is needed.
Can change final variable.
Can change String value.
Don’t need extending specific class.

2. Setup environment
2.1. Prerequisite
JDK 1.5 version
http://java.sun.com/javase/downloads/index_jdk5.jsp
Eclipse 3.2
http://www.eclipse.org/downloads/AJDT 1.4.0
http://www.eclipse.org/downloads/AJDT 1.4.0
Download Amock libarary and documentation from
and CGlib no dependency 2.1_3
Comments:
<< Home
I am interested in using amock - it looks interesting.
Could you please add amock jar to some public maven repository (ibiblio) ? It will be much easier to start using it.
keep up the good work :)
Tomek
Could you please add amock jar to some public maven repository (ibiblio) ? It will be much easier to start using it.
keep up the good work :)
Tomek
This _does_ look interesting. Unfortunately, even though I followed the instructions, I can't seem to get SimpleExampleTest working.
I get a null pointer error on testSimple() and a "method is called more than it is defined" error on testMethod... I take it that it's not meant to do this? Is there anything else I need to do like some command line arguments for aspects or something?
Post a Comment
I get a null pointer error on testSimple() and a "method is called more than it is defined" error on testMethod... I take it that it's not meant to do this? Is there anything else I need to do like some command line arguments for aspects or something?
<< Home