Skip to content

Commit

Permalink
Add pool position tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ImoutoChan committed Jan 29, 2025
1 parent 3f83178 commit a74b657
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Imouto.BooruParser.Tests/Loaders/DanbooruLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,21 @@ public async Task ShouldLoadPools()
var post = await loader.GetPostAsync(5246157);

post.Pools.Count.Should().BeGreaterThanOrEqualTo(1);
post.Pools.Should().OnlyContain(x => x.Position >= 0);
}

[Fact]
public async Task ShouldLoadPoolWithPosition()
{
var loader = _loaderFixture.GetLoaderWithoutAuth();

var post = await loader.GetPostByMd5Async("7fb1c60a41e2f71684835e9c9bdaa2d9");

post.Should().NotBeNull();
post.Pools.Should().HaveCount(1);
post.Pools.First().Id.Should().Be("21964");
post.Pools.First().Name.Should().Be("Original_-_Honeypot_(cherry-gig)");
post.Pools.First().Position.Should().Be(93);
}

[Fact]
Expand All @@ -450,6 +465,7 @@ public async Task ShouldLoadManyPools()
var post = await loader.GetPostAsync(599785);

post.Pools.Count.Should().BeGreaterThanOrEqualTo(3);
post.Pools.Should().OnlyContain(x => x.Position >= 0);
}

[Fact]
Expand Down

0 comments on commit a74b657

Please sign in to comment.