I'm trying to test a service implementation that handles conversion and persistence.
I have a repository mocked and and a conversion service wired in. Is it possible in Spock to have a Mock pass back the object that was returned to it?
The syntax I am trying to write would be as follows.
ie
// Have this method return the object that has been passed to it.
repository.save(_ as Entity) >> (Entity) _
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.