public async Task ShowArtistInfo() { if (ActiveItem == null) { return; } if (State != PlaybackViewModelStateEnum.Details) { _previousState = State; State = PlaybackViewModelStateEnum.Details; } ArtistInfoViewModel.Parameter = ActiveItem.Artist; await ArtistInfoViewModel.Populate(); }
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); }