public void Setup() { RestClient = MockRepository.GenerateMock<IRestClient>(); RestClient.Stub(r => r.GetResponse(string.Empty)).IgnoreArguments().Return(_jsonData); JsonParser = MockRepository.GenerateStub<IJsonParser>(); JsonParser.Stub(j => j.Parse(_jsonData)).Return(new List<Tweet> {new Tweet()}); Searcher = new TwitterSearcher(RestClient, JsonParser); }