-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathHumanCoderServiceTests.cs
29 lines (24 loc) · 1.19 KB
/
HumanCoderServiceTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Threading.Tasks;
using CaptchaSharp.Services;
using Xunit;
using Xunit.Abstractions;
namespace CaptchaSharp.Tests;
public class HumanCoderFixture : ServiceFixture
{
public HumanCoderFixture()
{
Service = new HumanCoderService(Config.Credentials.HumanCoderApiKey);
}
}
public class HumanCoderServiceTests(HumanCoderFixture fixture, ITestOutputHelper output)
: ServiceTests(fixture, output), IClassFixture<HumanCoderFixture>
{
[Fact] public Task GetBalanceAsync_ValidKey_GetsBalance() => BalanceTest();
// Do not overly use this test, or you will get banned.
[Fact] public Task ReportSolution_NoException() => ReportImageSolutionTest();
[Fact] public Task SolveImageCaptchaAsync_ValidCaptcha_ValidSolution() => ImageCaptchaTest();
[Fact] public Task SolveRecaptchaV2Async_NoProxy_ValidSolution() => RecaptchaV2Test_NoProxy();
[Fact] public Task SolveRecaptchaV2InvisibleAsync_NoProxy_ValidSolution() => RecaptchaV2InvisibleTest_NoProxy();
[Fact] public Task SolveRecaptchaV3Async_NoProxy_ValidSolution() => RecaptchaV3Test_NoProxy();
[Fact] public Task SolveRecaptchaV3EnterpriseAsync_NoProxy_ValidSolution() => RecaptchaV3EnterpriseTest_NoProxy();
}