keeganwitt / gmock

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

Move the implementation details of GMockController to the internal package #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Then GMockController delegates its methods to the internal controller.

It can hide all the implementation details and provide better encapsulation.

Original issue reported on code.google.com by JohnnyJianHY on 8 Feb 2009 at 8:51

GoogleCodeExporter commented 9 years ago
Any thought?

Original comment by JohnnyJianHY on 16 Feb 2009 at 1:30

GoogleCodeExporter commented 9 years ago
Sorry I was a bit busy and didn't notice your report. 

If you want to move the implementation details of the controller go head. You 
might
want to move GMock as well as it's no longer used directly.

Original comment by julien.g...@gmail.com on 16 Feb 2009 at 7:09

GoogleCodeExporter commented 9 years ago
Aha, you may have misunderstood the purpose of the GMock class. It is for 
someone who
is using the controller directly. For example:

without GMock:
def m = gmc.mock(Date, gmc.constructor('now'))

with GMock:
import static org.gmock.GMock.*
...
def m = gmc.mock(Date, constructor('now')) // a little shorter :)

You can regard GMock as a factory, containing all stateless factory methods, 
while
all stateful methods are in GMockController.

Original comment by JohnnyJianHY on 17 Feb 2009 at 1:35

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 17 Feb 2009 at 5:54

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 17 Feb 2009 at 5:59