public async Task Populate_ArtistDetailsDoesNotHaveBiography_SetsThePlaceHolderTextAsTheArtistBiography() { var biographies = new Biographies(); _mockEchoNestService.SetupGetArtistBiographies(artistName => new MockGetBiographiesResult(artistName) { GetResultFunc = () => biographies }); await _subject.Populate(); _subject.ArtistImage.Should().Be(GetArtistDetailsResultExtensionMethods.CoverArtPlaceholder); }
public async Task Populate_BiographiesHasItems_SetsTheBestBiographyOnTheViewModel() { var biography1 = new Biography { Text = "test1", Site = "wikipedia" }; var biography2 = new Biography { Text = "test2", Site = "last.fm" }; var biographies = new Biographies { Items = new List <Biography> { biography1, biography2 } }; _mockEchoNestService.SetupGetArtistBiographies(artistName => new MockGetBiographiesResult(artistName) { GetResultFunc = () => biographies }); await _subject.Populate(); _subject.Biography.Should().Be("test2"); }
public void Setup() { _subject = new Biographies(); }