示例#1
0
        public void ShouldParseKanaHanazawa()
        {
            PeopleTop top = Task.Run(() => jikan.GetPeopleTop()).Result;

            Assert.Equal("Hanazawa, Kana", top.Top.First().Name);
            Assert.Equal("花澤 香菜", top.Top.First().NameKanji);
            Assert.Equal(185, top.Top.First().MalId);
            Assert.Equal(1989, top.Top.First().Birthday.Value.Year);
            Assert.True(top.Top.First().Favorites > 60000);
        }
示例#2
0
        public async Task GetPeopleTop_NoParameters_ShouldParseKanaHanazawa()
        {
            PeopleTop top = await jikan.GetPeopleTop();

            Assert.Equal("Hanazawa, Kana", top.Top.First().Name);
            Assert.Equal("花澤 香菜", top.Top.First().NameKanji);
            Assert.Equal(185, top.Top.First().MalId);
            Assert.Equal(1989, top.Top.First().Birthday.Value.Year);
            Assert.True(top.Top.First().Favorites > 60000);
        }
示例#3
0
        public async Task GetPeopleTop_NoParameters_ShouldParseKanaHanazawa()
        {
            // When
            var top = await _jikan.GetPeopleTop();

            // Then
            var kana = top.Top.First();

            using (new AssertionScope())
            {
                kana.Name.Should().Be("Hanazawa, Kana");
                kana.NameKanji.Should().Be("花澤 香菜");
                kana.MalId.Should().Be(185);
                kana.Birthday.Value.Year.Should().Be(1989);
                kana.Favorites.Should().BeGreaterThan(60000);
            }
        }