From: Joe Gutierrez Date: 2009-04-18T04:49:49+09:00 Subject: Re: Testing classes making API calls Hi Alexander, I've run into the same problem and I did exactly what you're suggesting. You don't want to slow down your tests by making external API calls and since I'm assuming that you already know the behavior of the YouTube API, it makes sense to mimic that behavior in a mock class. Also, you will get great coverage results by doing this :) Joseph Gutierrez Web Developer - Inc21 jgutierrez@inc21.com Alexander Murmann wrote: > I am currently working on a project which gets a lot of info from the > YouTube API and does some data mining with it. > However I would really like to have the best test coverage possible. I > thought about writing a mock up class that replaces the class making all > the YouTube API calls for tests. But I still would be able to get the > class, making the calls, covered since all my results so heavily depend > on this. > > Are there any best practices for these situation? > > Thank you very much for all answers! > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.