@@ -30,12 +30,12 @@ private HttpRequestMessage GetEmptyRequest() =>
30
30
private HttpRequestMessage GetUnauthorizedRequest ( ) =>
31
31
new HttpRequestMessage ( HttpMethod . Get , $ "{ WebServerUrl } /api/unauthorized") ;
32
32
33
- private IPAddress LocalHost { get ; } = IPAddress . Parse ( "127.0.0.1" ) ;
33
+ private IPAddress Localhost { get ; } = IPAddress . Parse ( "127.0.0.1" ) ;
34
34
35
35
[ Test ]
36
36
public async Task RequestFailRegex_ReturnsForbidden ( )
37
37
{
38
- IPBanningModule . TryUnbanIP ( LocalHost ) ;
38
+ IPBanningModule . TryUnbanIP ( Localhost ) ;
39
39
40
40
_ = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
41
41
_ = await Client . SendAsync ( GetUnauthorizedRequest ( ) ) ;
@@ -51,12 +51,12 @@ public async Task RequestFailRegex_ReturnsForbidden()
51
51
[ Test ]
52
52
public async Task BanIpMinutes_ReturnsForbidden ( )
53
53
{
54
- IPBanningModule . TryUnbanIP ( LocalHost ) ;
54
+ IPBanningModule . TryUnbanIP ( Localhost ) ;
55
55
56
56
var response = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
57
57
Assert . AreEqual ( HttpStatusCode . NotFound , response . StatusCode , "Status Code NotFound" ) ;
58
58
59
- IPBanningModule . TryBanIP ( LocalHost , 10 ) ;
59
+ IPBanningModule . TryBanIP ( Localhost , 10 ) ;
60
60
61
61
response = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
62
62
Assert . AreEqual ( HttpStatusCode . Forbidden , response . StatusCode , "Status Code Forbidden" ) ;
@@ -65,12 +65,12 @@ public async Task BanIpMinutes_ReturnsForbidden()
65
65
[ Test ]
66
66
public async Task BanIpTimeSpan_ReturnsForbidden ( )
67
67
{
68
- IPBanningModule . TryUnbanIP ( LocalHost ) ;
68
+ IPBanningModule . TryUnbanIP ( Localhost ) ;
69
69
70
70
var response = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
71
71
Assert . AreEqual ( HttpStatusCode . NotFound , response . StatusCode , "Status Code NotFound" ) ;
72
72
73
- IPBanningModule . TryBanIP ( LocalHost , TimeSpan . FromMinutes ( 10 ) ) ;
73
+ IPBanningModule . TryBanIP ( Localhost , TimeSpan . FromMinutes ( 10 ) ) ;
74
74
75
75
response = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
76
76
Assert . AreEqual ( HttpStatusCode . Forbidden , response . StatusCode , "Status Code Forbidden" ) ;
@@ -79,12 +79,12 @@ public async Task BanIpTimeSpan_ReturnsForbidden()
79
79
[ Test ]
80
80
public async Task BanIpDateTime_ReturnsForbidden ( )
81
81
{
82
- IPBanningModule . TryUnbanIP ( LocalHost ) ;
82
+ IPBanningModule . TryUnbanIP ( Localhost ) ;
83
83
84
84
var response = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
85
85
Assert . AreEqual ( HttpStatusCode . NotFound , response . StatusCode , "Status Code NotFound" ) ;
86
86
87
- IPBanningModule . TryBanIP ( LocalHost , DateTime . Now . AddMinutes ( 10 ) ) ;
87
+ IPBanningModule . TryBanIP ( Localhost , DateTime . Now . AddMinutes ( 10 ) ) ;
88
88
89
89
response = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
90
90
Assert . AreEqual ( HttpStatusCode . Forbidden , response . StatusCode , "Status Code Forbidden" ) ;
@@ -93,7 +93,7 @@ public async Task BanIpDateTime_ReturnsForbidden()
93
93
[ Test ]
94
94
public async Task RequestFailRegex_UnbanIp_ReturnsNotFound ( )
95
95
{
96
- IPBanningModule . TryUnbanIP ( LocalHost ) ;
96
+ IPBanningModule . TryUnbanIP ( Localhost ) ;
97
97
98
98
_ = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
99
99
_ = await Client . SendAsync ( GetNotFoundRequest ( ) ) ;
@@ -117,7 +117,7 @@ public async Task RequestFailRegex_UnbanIp_ReturnsNotFound()
117
117
[ Test ]
118
118
public async Task MaxRps_ReturnsForbidden ( )
119
119
{
120
- IPBanningModule . TryUnbanIP ( LocalHost ) ;
120
+ IPBanningModule . TryUnbanIP ( Localhost ) ;
121
121
122
122
foreach ( var _ in Enumerable . Range ( 0 , 100 ) )
123
123
{
0 commit comments