Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Dec 31, 2019
1 parent 7dbcda2 commit 0c3535d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/EmbedIO/EmbedIO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<Description>A tiny, cross-platform, module based, MIT-licensed web server. Supporting NET Framework, Net Core, and Mono.</Description>
<Copyright>Copyright © Unosquare 2013-2019</Copyright>
<Copyright>Copyright © Unosquare 2013-2020</Copyright>
<AssemblyTitle>EmbedIO Web Server</AssemblyTitle>
<Authors>Unosquare, and Contributors to EmbedIO</Authors>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>EmbedIO</AssemblyName>
<PackageId>EmbedIO</PackageId>
<CodeAnalysisRuleSet>..\..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>
<Version>3.1.3</Version>
<Version>3.3.0</Version>
<Product>EmbedIO</Product>
<Company>Unosquare</Company>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
20 changes: 10 additions & 10 deletions test/EmbedIO.Tests/IPBanningModuleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ protected override void OnSetUp()
private HttpRequestMessage GetUnauthorizedRequest() =>
new HttpRequestMessage(HttpMethod.Get, $"{WebServerUrl}/api/unauthorized");

private IPAddress LocalHost { get; } = IPAddress.Parse("127.0.0.1");
private IPAddress Localhost { get; } = IPAddress.Parse("127.0.0.1");

[Test]
public async Task RequestFailRegex_ReturnsForbidden()
{
IPBanningModule.TryUnbanIP(LocalHost);
IPBanningModule.TryUnbanIP(Localhost);

_ = await Client.SendAsync(GetNotFoundRequest());
_ = await Client.SendAsync(GetUnauthorizedRequest());
Expand All @@ -51,12 +51,12 @@ public async Task RequestFailRegex_ReturnsForbidden()
[Test]
public async Task BanIpMinutes_ReturnsForbidden()
{
IPBanningModule.TryUnbanIP(LocalHost);
IPBanningModule.TryUnbanIP(Localhost);

var response = await Client.SendAsync(GetNotFoundRequest());
Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode, "Status Code NotFound");

IPBanningModule.TryBanIP(LocalHost, 10);
IPBanningModule.TryBanIP(Localhost, 10);

response = await Client.SendAsync(GetNotFoundRequest());
Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode, "Status Code Forbidden");
Expand All @@ -65,12 +65,12 @@ public async Task BanIpMinutes_ReturnsForbidden()
[Test]
public async Task BanIpTimeSpan_ReturnsForbidden()
{
IPBanningModule.TryUnbanIP(LocalHost);
IPBanningModule.TryUnbanIP(Localhost);

var response = await Client.SendAsync(GetNotFoundRequest());
Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode, "Status Code NotFound");

IPBanningModule.TryBanIP(LocalHost, TimeSpan.FromMinutes(10));
IPBanningModule.TryBanIP(Localhost, TimeSpan.FromMinutes(10));

response = await Client.SendAsync(GetNotFoundRequest());
Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode, "Status Code Forbidden");
Expand All @@ -79,12 +79,12 @@ public async Task BanIpTimeSpan_ReturnsForbidden()
[Test]
public async Task BanIpDateTime_ReturnsForbidden()
{
IPBanningModule.TryUnbanIP(LocalHost);
IPBanningModule.TryUnbanIP(Localhost);

var response = await Client.SendAsync(GetNotFoundRequest());
Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode, "Status Code NotFound");

IPBanningModule.TryBanIP(LocalHost, DateTime.Now.AddMinutes(10));
IPBanningModule.TryBanIP(Localhost, DateTime.Now.AddMinutes(10));

response = await Client.SendAsync(GetNotFoundRequest());
Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode, "Status Code Forbidden");
Expand All @@ -93,7 +93,7 @@ public async Task BanIpDateTime_ReturnsForbidden()
[Test]
public async Task RequestFailRegex_UnbanIp_ReturnsNotFound()
{
IPBanningModule.TryUnbanIP(LocalHost);
IPBanningModule.TryUnbanIP(Localhost);

_ = await Client.SendAsync(GetNotFoundRequest());
_ = await Client.SendAsync(GetNotFoundRequest());
Expand All @@ -117,7 +117,7 @@ public async Task RequestFailRegex_UnbanIp_ReturnsNotFound()
[Test]
public async Task MaxRps_ReturnsForbidden()
{
IPBanningModule.TryUnbanIP(LocalHost);
IPBanningModule.TryUnbanIP(Localhost);

foreach (var _ in Enumerable.Range(0, 100))
{
Expand Down
2 changes: 1 addition & 1 deletion test/EmbedIO.Tests/TestObjects/TestController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public Person GetOptionalPerson(string skill, int? age = null)
throw HttpException.Unauthorized();

private static Person CheckPerson(int id)
=>PeopleRepository.Database.FirstOrDefault(p => p.Key == id)
=> PeopleRepository.Database.FirstOrDefault(p => p.Key == id)
?? throw HttpException.NotFound();
}
}

0 comments on commit 0c3535d

Please sign in to comment.