Search code examples
visual-studio-2012google-api-dotnet-clientmicrosoft-fakes

Unable to create Fakes for Google APIs


I am trying to create some unit tests for an app I am writing which consumes google APIs (in particular Calendar v3 (https://developers.google.com/google-apps/calendar/)

I right click on the reference to the calendar assembly and say "Add Fake Assembly"

This creates a .Fakes file in the Fakes directory, but does not create a Fakes assembly.

I'm using vs2012 ultimate, and several other developers have tried this as well, so its not a machine level thing. We even created a blank solution, added the calendar API via nuget, and then tried, and it had the same behavior.

No error shows up in the output window, no indication that it didn't work (other than it doesn't work!)


Solution

  • I ended up creating a wrapper interface, and wrapper concrete object for the calendar APIs, and then I can just use regular Mocks to write these tests.