You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Captcha.Core/Constants.cs
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,6 @@ namespace Captcha.Core;
4
4
5
5
publicstaticclassConstants
6
6
{
7
-
publicconstintMinCaptchaSize=10;
8
-
publicconstintMaxCaptchaSize=1024;
9
7
publicconstintDefaultCaptchaWidth=400;
10
8
publicconstintDefaultCaptchaHeight=100;
11
9
publicconstfloatDefaultFrequency=100F;
@@ -16,11 +14,15 @@ public static class Constants
16
14
publicconstfloatWarpCaptchaTextFrequency=4F;
17
15
publicconstintCaptchaNoise=50;
18
16
19
-
// According to https://learn.microsoft.com/en-us/dotnet/api/skiasharp.sktypeface, this should be thread-safe
17
+
/// <summary>
18
+
/// This object is shared across threads, however according to https://learn.microsoft.com/en-us/dotnet/api/skiasharp.sktypeface it is fine to share it across threads.
// According to https://learn.microsoft.com/en-us/dotnet/api/skiasharp.sktypeface, this should be thread-safe
23
+
/// <summary>
24
+
/// This object is shared across threads, however according to https://learn.microsoft.com/en-us/dotnet/api/skiasharp.sktypeface it is fine to share it across threads.
I want to send different captcha requests and assure the image is generated
3
+
4
+
Scenario Outline: Send captcha requests
5
+
Given I have a captcha request using get with following parameters:
6
+
| Text | Width | Height | Difficulty |
7
+
| <Text> | <Width> | <Height> | <Difficulty> |
8
+
When I send the get request to the Create endpoint of the CaptchaController
9
+
Then I expect a captcha image to be returned with the following attributes:
10
+
| Width | Height |
11
+
| <ExpectedWidth> | <ExpectedHeight> |
12
+
Then I expect a captcha image to contain at least '<FirstColorPixels>' pixels of color '<FirstColorHex>' and at least '<SecondColorPixels>' pixels of color '<SecondColorHex>'
0 commit comments