keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

GroovyTestCase assertions don't work when @WithGMock is used. #128

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using annotation @WithGMock instead of extending GMockTestCase, additional 
GroovyTestCase assertions, e.g. shouldFail() can't be resolved.

Original issue reported on code.google.com by gousei...@gmail.com on 26 Mar 2012 at 12:44

GoogleCodeExporter commented 8 years ago
Workaround is to create a reference to a method, e.g.

final shouldFail = new GroovyTestCase().&shouldFail

Original comment by gousei...@gmail.com on 26 Mar 2012 at 12:49

GoogleCodeExporter commented 8 years ago
@WithGMock only injects the methods related to gmock, but not the methods in 
GroovyTestCase. If you need shouldFail(), you have to extend GroovyTestCase.

Original comment by JohnnyJianHY on 26 Mar 2012 at 12:54