Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
 public void Setup()
 {
     _subject = new Biographies();
 }