Example #1
0
        public void SearchResultsRetrieved_PassesToITrackSubscriber()
        {
            var trackList = new List<Track>();
            var searchResults = new SearchResult(trackList);

            _searchManager.SearchResultsRetrieved(searchResults);

            Assert.Fail("Revamp test.");
        }
Example #2
0
        public void SearchResultsRetrieved_SetsLastSearchPropertyToResult()
        {
            var trackList = new List<Track>();
            var searchResults = new SearchResult(trackList);

            _searchManager.SearchResultsRetrieved(searchResults);

            Assert.AreEqual(searchResults, _searchManager.LastSearch);
        }
Example #3
0
        public void Handle_NoTracksFound_SetsOutputToNoTracksFound()
        {
            var trackList = new List<Track>();
            var result = new SearchResult(trackList);

            _mainViewModel.Handle(new SearchResultMessage(result));

            Assert.AreEqual("No tracks found.", _mainViewModel.Output);
        }
Example #4
0
        public void Handle_TracksFound_SetsOutputToResultReturned()
        {
            var track = GetPlayableTrack();
            var trackList = new List<Track>();
            trackList.Add(track);
            var result = new SearchResult(trackList);

            _mainViewModel.Handle   (new SearchResultMessage(result));

            Assert.AreEqual("Search result listed.", _mainViewModel.Output);
        }
Example #5
0
        public void Handle_AnyResult_SetsTrackListToResultList()
        {
            var track = GetPlayableTrack();
            var trackList = new List<Track>();
            trackList.Add(track);
            var result = new SearchResult(trackList);

            _mainViewModel.Handle(new SearchResultMessage(result));

            Assert.AreEqual(trackList, _mainViewModel.TrackList);
        }
Example #6
0
 public void SearchResultsRetrieved(SearchResult searchResults)
 {
     LastSearch = searchResults;
 }
Example #7
0
 public SearchResultMessage(SearchResult Result)
 {
     this.Result = Result;
 }