Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for method podcast.searchPodcast #1572

Merged
80 changes: 80 additions & 0 deletions VkNet.Tests/Categories/Podcasts/SearchPodcastTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using FluentAssertions;
using VkNet.Tests.Infrastructure;
using Xunit;

namespace VkNet.Tests.Categories.Podcasts;

public class SearchPodcastTest : CategoryBaseTest
{
protected override string Folder => "Podcasts";

[Fact]
public void SearchPodcast()
{
Url = "https://api.vk.com/method/podcasts.searchPodcast";

ReadCategoryJsonPath(nameof(Api.Podcasts.SearchPodcast));

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

result.Should().
NotBeNull();

result.ResultsTotal.
Should().
Be(32);

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

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[4].
Title.
Should().
Be("Noosphere Studio | Наука");

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

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

result.Podcasts[4].
Covers.
Sizes[2].
Height.
Should().
Be(160);
}
}
40 changes: 0 additions & 40 deletions VkNet.Tests/Categories/Podcasts/SearchTest.cs

This file was deleted.

160 changes: 0 additions & 160 deletions VkNet.Tests/TestData/Categories/Podcasts/Search.json

This file was deleted.

Loading
Loading