-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathAmazonWafTest.cs
32 lines (29 loc) · 1.35 KB
/
AmazonWafTest.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
30
31
32
using System.Collections.Generic;
using System.Threading.Tasks;
using NUnit.Framework;
using TwoCaptcha.Captcha;
namespace TwoCaptcha.Tests
{
[TestFixture]
public class AmazonWafTest : AbstractWrapperTestCase
{
[Test]
public async Task TestAllOptions()
{
AmazonWaf captcha = new AmazonWaf();
captcha.SetSiteKey("AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AF5H1K/siwSLK7RfstKtN5bAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglg");
captcha.SetUrl("https://non-existent-example.execute-api.us-east-1.amazonaws.com");
captcha.SetContext("test_iv");
captcha.SetIV("test_context");
var parameters = new Dictionary<string, string>();
parameters["method"] = "amazon_waf";
parameters["sitekey"] = "AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AF5H1K/siwSLK7RfstKtN5bAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglg";
parameters["pageurl"] = "https://non-existent-example.execute-api.us-east-1.amazonaws.com";
parameters["context"] = "test_iv";
parameters["iv"] = "test_context";
parameters["soft_id"] = "4582";
parameters["json"] = "0";
await CheckIfCorrectParamsSendAndResultReturned(captcha, parameters);
}
}
}