Skip to content

Commit

Permalink
Add "PodcastSearchInfo" model and changes test for new model for ticket
Browse files Browse the repository at this point in the history
vknet#1222

- Add "PodcastSearchInfo" model for new answer from API method "podcasts.searchPodcast"
- Changed tests in "SearchPodcastTest" for new model
  • Loading branch information
Rahovski committed Aug 11, 2023
1 parent d4f4e65 commit 62e2fbd
Show file tree
Hide file tree
Showing 4 changed files with 1,268 additions and 189 deletions.
64 changes: 52 additions & 12 deletions VkNet.Tests/Categories/Podcasts/SearchPodcastTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,64 @@ public void SearchPodcast()

var result = Api.Podcasts.SearchPodcast(new()
{
SearchString = "дудь",
SearchString = "наука",
Offset = 0,
Count = 100
});

result.Should()
.NotBeNull();
result.Should().
NotBeNull();

result.Podcasts[0]
.OwnerId.Should()
.Be(-189167851);
result.ResultsTotal.
Should().
Be(32);

result.Episodes[0]
.Id.Should()
.Be(456239643);
result.Podcasts[0].
OwnerUrl.
Should().
Be("https://vk.com/science_in_palm");

result.Groups[0]
.Id.Should()
.Be(189167851);
result.Podcasts[0].
Title.
Should().
Be("Наука в Ладошке");

result.Podcasts[0].
Covers.
Sizes[0].
Width.
Should().
Be(640);

result.Podcasts[0].
Covers.
Sizes[0].
Type.
Should().
Be("a");

result.Podcasts[5].
Title.
Should().
Be("Наука и рок-н-ролл");

result.Podcasts[5].
OwnerUrl.
Should()
.Be("https://vk.com/klausius");

result.Podcasts[5].
Covers.
Sizes[1].
Type.
Should()
.Be("c");

result.Podcasts[5].
Covers.
Sizes[2].
Height.
Should().
Be(160);
}
}
Loading

0 comments on commit 62e2fbd

Please sign in to comment.