keeganwitt / gmock

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

Strong typing support #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Support for strong typing using the following syntax:

File mockFile = mock(File)

Original issue reported on code.google.com by julien.g...@gmail.com on 12 Oct 2008 at 10:24

GoogleCodeExporter commented 9 years ago
Actually, strong typing has three aspects:
1. a class implemented GroovyObject, or an interface extended GroovyObject, 
that is, 
classes and interfaces written in Groovy
2. a normal Java interface
3. a normal Java class
Each kind has different implementation approaches:
1. replace MetaClass
2. use Proxy
3. use cglib

Original comment by JohnnyJianHY on 12 Oct 2008 at 12:14

GoogleCodeExporter commented 9 years ago
I understand the different approach. If we pick the cglib one we should get the 
two
other one. I believe it's also the most difficult one.

What's your opinion?

Original comment by julien.g...@gmail.com on 12 Oct 2008 at 1:38

GoogleCodeExporter commented 9 years ago
I just wondered: should this issue be seperated into three? And implement one 
by one.
And I think, it is always not a good idea to use cglib to change the byte code, 
so 
don't use it unless we have got to do so.

Original comment by JohnnyJianHY on 13 Oct 2008 at 1:53

GoogleCodeExporter commented 9 years ago
You are probably right. We could do the three independently and use the best 
approach
of mocking dynamically. 

This would make the cglib library addition an option for the user. I like that.

Original comment by julien.g...@gmail.com on 13 Oct 2008 at 5:48

GoogleCodeExporter commented 9 years ago
Closed as being seperated into three issues: issue 15, issue 16, issue 17.

Original comment by JohnnyJianHY on 14 Oct 2008 at 2:14

GoogleCodeExporter commented 9 years ago
Issue 17 has been merged into this issue.

Original comment by JohnnyJianHY on 8 Dec 2008 at 2:52

GoogleCodeExporter commented 9 years ago
Issue 16 has been merged into this issue.

Original comment by JohnnyJianHY on 8 Dec 2008 at 2:52

GoogleCodeExporter commented 9 years ago
Issue 15 has been merged into this issue.

Original comment by JohnnyJianHY on 8 Dec 2008 at 2:52

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 8 Dec 2008 at 2:54

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 10 Dec 2008 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 15 Dec 2008 at 3:05