Hello
I'm new to
testing with mock objects and have an easy and maybe stupid question.
I have a handler class that among other things stores Groups in the database. The groups (and other data) are given in a data object.
For that handler I want write an unit test to check if groups are stored correct.
I found out that's good to use mock objects intead of using the database. So I decide to use EasyMock.
My problem is - in every code I found on the net EasyMock is used as follows:
So I have the problem that I don't provided that in my class. The StorageHandler's daos cannot set from the outside.
My question: Have I rewrite my class to use mock objects to set daos in that way? Or did I misunderstood the princip of using EasyMock?
Many thank for all help !
[ June 13, 2008: Message edited by: Oliver Brocker ]