コード例 #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);
        }
コード例 #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");
        }
コード例 #3
0
 public void Setup()
 {
     _subject = new Biographies();
 }