public void TrySearch_ShouldInvokePodcastSearchUnitTest(PodHead sut, IPodcastSearch podcastSearch, string searchTerm, uint limit) { sut.SetField(typeof(IPodcastSearch), podcastSearch); bool success = sut.TrySearch(searchTerm, out IEnumerable <PodcastFeed> podcasts, out string errors, limit); Assert.IsTrue(success); Assert.IsNull(errors); podcastSearch.Received(1).Search(searchTerm, limit); }
public void Search_ShouldInvokePodcastSearchUnitTest(PodHead sut, IPodcastSearch podcastSearch, string searchTerm, uint limit) { sut.SetField(typeof(IPodcastSearch), podcastSearch); sut.Search(searchTerm, limit); podcastSearch.Received(1).Search(searchTerm, limit); }
public PodHead() { _parser = new RssParser(); _podcastCharts = new PodcastCharts(_parser); _podcastSearch = new PodcastSearch(_parser); }