public void GetPeople_HasCharacters_ReturnsPersonInfo() { var series = new AniDbSeriesData { Characters = new[] { new CharacterData { Name = "CharacterName", Seiyuu = new SeiyuuData { PictureFileName = "Picture.jpg", Name = "Reverse Name" } } } }; var aniDbParser = new AniDbParser(); var person = aniDbParser.GetPeople(series).Single(); person.ImageUrl.Should().Be("http://img7.anidb.net/pics/anime/Picture.jpg"); person.Type.Should().Be(PersonType.Actor); person.Role.Should().Be("CharacterName"); }
public void GetPeople_NullCreators_ReturnsEmpty() { var series = new AniDbSeriesData { Characters = new CharacterData[0] }; var aniDbParser = new AniDbParser(); aniDbParser.GetPeople(series).Should().BeEmpty(); }
public void GetPeople_CharactersWithoutSeiyuu_ReturnsEmpty() { var series = new AniDbSeriesData { Characters = new[] { new CharacterData() } }; var aniDbParser = new AniDbParser(); aniDbParser.GetPeople(series).Should().BeEmpty(); }
public void GetPeople_HasCreatorsAndCharacters_ReturnsBoth() { var series = new AniDbSeriesData { Characters = new[] { new CharacterData { Name = "CharacterName1", Seiyuu = new SeiyuuData { PictureFileName = "Picture1.jpg", Name = "NameA" } }, new CharacterData { Name = "CharacterName2", Seiyuu = new SeiyuuData { PictureFileName = "Picture2.jpg", Name = "NameB" } } }, Creators = new[] { new CreatorData { Name = "Name1", Type = "Music" }, new CreatorData { Name = "Name2", Type = "Direction" } } }; var aniDbParser = new AniDbParser(); var people = aniDbParser.GetPeople(series); people.Select(p => p.Name).Should().BeEquivalentTo("NameA", "NameB", "Name1", "Name2"); }
public void GetPeople_HasCreators_ReturnsReversedNames() { var series = new AniDbSeriesData { Creators = new[] { new CreatorData { Name = "Reverse Name" } } }; var aniDbParser = new AniDbParser(); aniDbParser.GetPeople(series).Single().Name.Should().Be("Name Reverse"); }
public void GetPeople_MusicType_MapsTypeToComposer() { var series = new AniDbSeriesData { Creators = new[] { new CreatorData { Name = "Reverse Name", Type = "Music" } } }; var aniDbParser = new AniDbParser(); var person = aniDbParser.GetPeople(series).Single(); person.Type.Should().Be(PersonType.Composer); }
public void GetPeople_HasCreators_ReturnsPersonInfo() { var series = new AniDbSeriesData { Creators = new[] { new CreatorData { Name = "Reverse Name", Type = "Direction" } } }; var aniDbParser = new AniDbParser(); var person = aniDbParser.GetPeople(series).Single(); person.Type.Should().Be(PersonType.Director); }