Open GoogleCodeExporter opened 9 years ago
For mocking purposes you may want to use the interface (IClientServiceRequest)
for example and not changing the methods to be virtual.
Original comment by pele...@google.com
on 25 Sep 2013 at 12:06
Can you advise how I can inject a mock IClientServiceRequest into the google
drive sdk library?
For example I want to mock ChangesResource.ListRequest so that when I call
Execute I get my fake ChangeList response.
To this end I have a mock DriveService that returns a mock ChangesResource from
DriveService.Changes.
My mock changes resource reutrns a mock ChangesResource.ListRequest (this
ultimately inherits from IClientServiceRequest) but is of type
ChangesResource.ListRequest. It's because I am mocking
ChangesResource.ListRequest that I need to be able override the Execute method .
Is there a different way where I can just use the mock IClientServiceRequest
then. Perhaps using the Initializer?
Original comment by ian....@releaseconsulting.co.uk
on 25 Sep 2013 at 8:39
Original comment by pele...@google.com
on 12 Dec 2013 at 3:41
Original issue reported on code.google.com by
ian....@releaseconsulting.co.uk
on 24 Sep 2013 at 2:33