示例#1
0
        public async Task ShowArtistInfo()
        {
            if (ActiveItem == null)
            {
                return;
            }

            if (State != PlaybackViewModelStateEnum.Details)
            {
                _previousState = State;
                State          = PlaybackViewModelStateEnum.Details;
            }

            ArtistInfoViewModel.Parameter = ActiveItem.Artist;
            await ArtistInfoViewModel.Populate();
        }
示例#2
0
        public async Task Populate_Always_TriesToGetTheArtistInfoUsingTheParameterPropertyValue()
        {
            _subject.Parameter = "testArtist";
            _mockLastFmService.SetupGetArtistDetails(artistName =>
            {
                artistName.Should().Be("testArtist");
                return(new MockGetArtistDetailsResult(artistName));
            });

            await _subject.Populate();

            _mockLastFmService.GetArtistDetailsCallCount.Should().Be(1);
        }