diff --git a/Directory.Build.props b/Directory.Build.props
index b8c92aca..7ee62878 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,7 +4,7 @@
- 2.12.0
+ 2.13.0
WireMock.Net-Logo.png
https://github.com/wiremock/WireMock.Net
Apache-2.0
@@ -51,8 +51,8 @@
-
-
+
+
diff --git a/Generate-ReleaseNotes.cmd b/Generate-ReleaseNotes.cmd
index 1d107319..f5444cdc 100644
--- a/Generate-ReleaseNotes.cmd
+++ b/Generate-ReleaseNotes.cmd
@@ -1,6 +1,6 @@
rem https://github.com/StefH/GitHubReleaseNotes
-SET version=2.12.0
+SET version=2.13.0
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels wontfix test question invalid doc duplicate example environment --version %version% --token %GH_TOKEN%
diff --git a/examples/WireMock.Net.Console.NET8/Program.cs b/examples/WireMock.Net.Console.NET8/Program.cs
index 9ca8b200..eb24290b 100644
--- a/examples/WireMock.Net.Console.NET8/Program.cs
+++ b/examples/WireMock.Net.Console.NET8/Program.cs
@@ -1,8 +1,6 @@
// Copyright © WireMock.Net
-using System.IO;
using System.Reflection;
-using System.Threading.Tasks;
using log4net;
using log4net.Config;
using log4net.Repository;
@@ -12,8 +10,7 @@ namespace WireMock.Net.Console.NET8;
static class Program
{
- private static readonly ILoggerRepository LogRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
- private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
+ private static readonly ILoggerRepository LogRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()!);
static async Task Main(params string[] args)
{
diff --git a/examples/WireMock.Net.ConsoleApp.UsingNuGet/WireMock.Net.ConsoleApp.UsingNuGet.csproj b/examples/WireMock.Net.ConsoleApp.UsingNuGet/WireMock.Net.ConsoleApp.UsingNuGet.csproj
index b354236d..0836b3a1 100644
--- a/examples/WireMock.Net.ConsoleApp.UsingNuGet/WireMock.Net.ConsoleApp.UsingNuGet.csproj
+++ b/examples/WireMock.Net.ConsoleApp.UsingNuGet/WireMock.Net.ConsoleApp.UsingNuGet.csproj
@@ -16,7 +16,7 @@
-
+
\ No newline at end of file
diff --git a/examples/WireMock.Net.Service/WireMock.Net.Service.csproj b/examples/WireMock.Net.Service/WireMock.Net.Service.csproj
index 33a16f43..9841bf3b 100644
--- a/examples/WireMock.Net.Service/WireMock.Net.Service.csproj
+++ b/examples/WireMock.Net.Service/WireMock.Net.Service.csproj
@@ -36,12 +36,6 @@
Wiremock.Net.Service.Program
-
- ..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll
-
-
- ..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll
-
@@ -91,13 +85,13 @@
- 3.3.0
+ 3.3.2
- 2.3.9
+ 2.3.11
- 2.10.0
+ 2.12.0
diff --git a/test/WireMock.Net.Tests.UsingNuGet/WireMock.Net.Tests.UsingNuGet.csproj b/test/WireMock.Net.Tests.UsingNuGet/WireMock.Net.Tests.UsingNuGet.csproj
index 0372f447..bee54634 100644
--- a/test/WireMock.Net.Tests.UsingNuGet/WireMock.Net.Tests.UsingNuGet.csproj
+++ b/test/WireMock.Net.Tests.UsingNuGet/WireMock.Net.Tests.UsingNuGet.csproj
@@ -15,8 +15,8 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
all
@@ -29,13 +29,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs b/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs
index e82df9d7..259c3577 100644
--- a/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs
+++ b/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs
@@ -1,16 +1,16 @@
// Copyright © WireMock.Net
+using JsonConverter.Newtonsoft.Json;
+using JsonConverter.System.Text.Json;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Primitives;
using Moq;
using WireMock.Handlers;
+using WireMock.Owin;
using WireMock.Owin.Mappers;
using WireMock.ResponseBuilders;
using WireMock.Types;
using WireMock.Util;
-using WireMock.Owin;
-using Microsoft.AspNetCore.Http;
-using Microsoft.Extensions.Primitives;
-using JsonConverter.Newtonsoft.Json;
-using JsonConverter.System.Text.Json;
namespace WireMock.Net.Tests.Owin.Mappers;
@@ -40,11 +40,11 @@ public class OwinResponseMapperTests
_headers = new Mock();
_headers.SetupAllProperties();
-#if NET452
- _headers.Setup(h => h.AppendValues(It.IsAny(), It.IsAny()));
-#else
+
+ // Extension methods(here: HeaderDictionaryExtensions.Append) may not be used in setup / verification expressions.
+#pragma warning disable ASP0019
_headers.Setup(h => h.Add(It.IsAny(), It.IsAny()));
-#endif
+#pragma warning restore ASP0019
_responseMock = new Mock();
_responseMock.SetupAllProperties();
@@ -238,12 +238,8 @@ public class OwinResponseMapperTests
await _sut.MapAsync(responseMessage, _responseMock.Object);
// Assert
-#if NET452
- _headers.Verify(h => h.AppendValues("h", new string[] { "x", "y" }), Times.Once);
-#else
var v = new StringValues();
_headers.Verify(h => h.TryGetValue("h", out v), Times.Once);
-#endif
}
[Fact]
diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs
index c9b8faa7..99aaf413 100644
--- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs
+++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs
@@ -1,6 +1,5 @@
// Copyright © WireMock.Net
-
using WireMock.Matchers.Request;
using WireMock.RequestBuilders;
@@ -17,7 +16,7 @@ public class RequestBuilderUsingMethodTests
// Assert
var matchers = requestBuilder.GetPrivateFieldValue>("_requestMatchers");
matchers.Count.Should().Be(1);
- (matchers[0] as RequestMessageMethodMatcher).Methods.Should().ContainSingle("CONNECT");
+ matchers[0].Should().BeOfType().Which.Methods.Should().ContainSingle("CONNECT");
}
[Fact]
@@ -29,7 +28,7 @@ public class RequestBuilderUsingMethodTests
// Assert
var matchers = requestBuilder.GetPrivateFieldValue>("_requestMatchers");
matchers.Count.Should().Be(1);
- (matchers[0] as RequestMessageMethodMatcher).Methods.Should().ContainSingle("OPTIONS");
+ matchers[0].Should().BeOfType().Which.Methods.Should().ContainSingle("OPTIONS");
}
[Fact]
@@ -41,7 +40,7 @@ public class RequestBuilderUsingMethodTests
// Assert
var matchers = requestBuilder.GetPrivateFieldValue>("_requestMatchers");
matchers.Count.Should().Be(1);
- (matchers[0] as RequestMessageMethodMatcher).Methods.Should().ContainSingle("PATCH");
+ matchers[0].Should().BeOfType().Which.Methods.Should().ContainSingle("PATCH");
}
[Fact]
@@ -53,7 +52,7 @@ public class RequestBuilderUsingMethodTests
// Assert
var matchers = requestBuilder.GetPrivateFieldValue>("_requestMatchers");
matchers.Count.Should().Be(1);
- (matchers[0] as RequestMessageMethodMatcher).Methods.Should().ContainSingle("TRACE");
+ matchers[0].Should().BeOfType().Which.Methods.Should().ContainSingle("TRACE");
}
[Fact]