Author Login
Post Reply
I have the following test:
public void test...() {
final Story story = buildStory();
context.checking(new Expecatations() { {
one(databaseDao).persist(with(storyMatcher)); will(returnValue(story));
} } );
}
public interface DatabaseDao {
Story persist(Story story);
}
Is there any way around defining an Story for the return? I wouldn't be so
worried but using hibernate's merge does not update the reference, but returns a
copy of the attached object.
so something like this...
...
context.checking(new Expecatations() { {
one(databaseDao).persist(with(storyMatcher)); will(returnReference());
} } );
...
so that the returned object will be the object that is passed in to the persist
method?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email