Gmock 0.7.0 released

We are extremely pleased to announce the release of Gmock 0.7.0. Gmock is a mocking framework for the Groovy language. Gmock is all about simple syntax and readability of your tests so you can spend less time learning the framework and more writing code.

This release bring two long awaited features: strict ordering and partial mocking.

Strict ordering is accomplished through the ordered closure. Here is an example with an hypothetic cached cat database:

def database = mock()
def cache = mock()
ordered {
database.open()
cache.get("select * from cat").returns(null)
database.query("select * from cat").returns(["cat1", "cat2"])
cache.put("select * from cat", ["cat1", "cat2"])
database.close()
}

The partial mocking is performed simply by using the mock method on your concrete object. Here is how it works with a grails controller:

def controller = new SomeController()
mock(controller).params.returns([id: 3])

Gmock 0.7.0 is the last release compatible with Groovy 1.5.x. Support for Groovy 1.6.0 is coming soon in our next release.

Please visit http://gmock.org or http://code.google.com/p/gmock/ for more information.

We are looking for your feedback and how you feel we could improve Gmock in the route to the 1.0.0.

The Gmock devs

0

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

bet replied on Sat, 2009/06/06 - 5:17am

Have You ever thought about bbetting online ?? have You ever asked yourself why the Sports betting is so popular around the world??. Have You ever thoght aboyt it. Sport betting is awesome to earn some exra cash especialy Betfair exchange platform.Betfair offers You best odds in all kind sports. Think about it and register just today. Dont wait. You can also get huge Betting Bonus up to $1000 don't You wanna get this money for free?? I don't think so. so registre and get Your Free Bet today. dont hesitate, it is not big problem use it within fw seconds. betfair is best Bookmaker in this market so feel free bet there everyoday. Just bet home and earn $1000 everyday. Be master of trading on betfair. Be rich be rich or die trying.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.