コード例 #1
0
ファイル: TopTestClass.cs プロジェクト: AllanJone/jikan.net
        public void ShouldParseLelouchLamperouge()
        {
            CharactersTop top = Task.Run(() => jikan.GetCharactersTop()).Result;

            Assert.Equal("Lamperouge, Lelouch", top.Top.First().Name);
            Assert.Equal("ルルーシュ・ランペルージ", top.Top.First().NameKanji);
            Assert.Equal(417, top.Top.First().MalId);
            Assert.True(top.Top.First().Favorites > 85000);
        }
コード例 #2
0
        public async Task GetCharactersTop_NoParameters_ShouldParseLelouchLamperouge()
        {
            CharactersTop top = await jikan.GetCharactersTop();

            Assert.Equal("Lamperouge, Lelouch", top.Top.First().Name);
            Assert.Equal("ルルーシュ・ランペルージ", top.Top.First().NameKanji);
            Assert.Equal(417, top.Top.First().MalId);
            Assert.True(top.Top.First().Favorites > 85000);
        }
コード例 #3
0
ファイル: TopTests.cs プロジェクト: N0D4N/jikan.net
        public async Task GetCharactersTop_NoParameters_ShouldParseLelouchLamperouge()
        {
            // When
            var top = await _jikan.GetCharactersTop();

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

            using (new AssertionScope())
            {
                lelouch.Name.Should().Be("Lamperouge, Lelouch");
                lelouch.NameKanji.Should().Be("ルルーシュ・ランペルージ");
                lelouch.MalId.Should().Be(417);
                lelouch.Favorites.Should().BeGreaterThan(85000);
            }
        }