mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-24 09:45:01 +01:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b7e5908cb | ||
|
|
b1032c9dcd | ||
|
|
4d0f96eabe | ||
|
|
ef12cb70cc | ||
|
|
c212d07c53 | ||
|
|
b9afb126cf | ||
|
|
8dc9c4b46c | ||
|
|
0441c1d85e | ||
|
|
1f23022460 | ||
|
|
8d57f37261 | ||
|
|
ca6c39c63a | ||
|
|
d7173d34a3 | ||
|
|
5e301fd74b | ||
|
|
0d8b3b1438 | ||
|
|
fe265faf33 | ||
|
|
7da264636e | ||
|
|
14a5f37bc6 | ||
|
|
a6ee2dacc7 | ||
|
|
b06b3c8e8b | ||
|
|
2e5bfc41d5 | ||
|
|
9d54994747 | ||
|
|
5da6e103ba | ||
|
|
cbf82836f5 | ||
|
|
0789b97883 | ||
|
|
ce4d39ae55 | ||
|
|
11c0782673 | ||
|
|
6b15b80605 | ||
|
|
55fbc52ce9 | ||
|
|
2a1d14b52c | ||
|
|
bb3147eb8d | ||
|
|
3087ce55b1 |
44
CHANGELOG.md
44
CHANGELOG.md
@@ -1,3 +1,43 @@
|
|||||||
|
# 1.5.1 (08 July 2022)
|
||||||
|
- [#762](https://github.com/WireMock-Net/WireMock.Net/pull/762) - Bump Newtonsoft.Json from 11.0.2 to 13.0.1 in /examples/WireMock.Net.WebApplication.NETCore2 [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#763](https://github.com/WireMock-Net/WireMock.Net/pull/763) - Bump Newtonsoft.Json from 6.0.1 to 13.0.1 in /examples/WireMock.Net.Client.Net472 [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#765](https://github.com/WireMock-Net/WireMock.Net/pull/765) - Update WireMock.Org.Abstractions and WireMock.Org.RestClient [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#766](https://github.com/WireMock-Net/WireMock.Net/pull/766) - Bump Microsoft.AspNetCore.Http from 2.1.1 to 2.1.22 in /examples/WireMock.Net.StandAlone.Net461 [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#767](https://github.com/WireMock-Net/WireMock.Net/pull/767) - Rename (WireMock.Pact.Models.V2)-Request to PactRequest and -Response to PactResponse [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#764](https://github.com/WireMock-Net/WireMock.Net/issues/764) - Wrong mapping of method GetAdminMappingsAsync from IWireMockOrgApi [bug]
|
||||||
|
|
||||||
|
# 1.5.0 (09 June 2022)
|
||||||
|
- [#755](https://github.com/WireMock-Net/WireMock.Net/pull/755) - Add MatchOperator "Or", "And" and "Average" for patterns [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.4.43 (21 May 2022)
|
||||||
|
- [#757](https://github.com/WireMock-Net/WireMock.Net/pull/757) - Log correct exception message when handling aggregate exceptions contributed by [siewers](https://github.com/siewers)
|
||||||
|
- [#759](https://github.com/WireMock-Net/WireMock.Net/pull/759) - Add WireMock.Net.xUnit project [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#756](https://github.com/WireMock-Net/WireMock.Net/issues/756) - WireMockConsoleLogger aggregate exception handling bug? [bug]
|
||||||
|
- [#758](https://github.com/WireMock-Net/WireMock.Net/issues/758) - Add support for logging to an xUnit ITestOutputHelper [feature]
|
||||||
|
|
||||||
|
# 1.4.42 (13 May 2022)
|
||||||
|
- [#748](https://github.com/WireMock-Net/WireMock.Net/pull/748) - Initial support for converting the mappings to a Pact(flow) json file [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#749](https://github.com/WireMock-Net/WireMock.Net/pull/749) - Swagger support [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#750](https://github.com/WireMock-Net/WireMock.Net/pull/750) - [Snyk] Security upgrade Newtonsoft.Json from 11.0.2 to 13.0.1 contributed by [snyk-bot](https://github.com/snyk-bot)
|
||||||
|
- [#751](https://github.com/WireMock-Net/WireMock.Net/pull/751) - Update NuGets packages [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#741](https://github.com/WireMock-Net/WireMock.Net/issues/741) - Integrate with Pact [feature]
|
||||||
|
- [#753](https://github.com/WireMock-Net/WireMock.Net/issues/753) - FluentAssertions - assert the server has not received a call [feature]
|
||||||
|
|
||||||
|
# 1.4.41 (21 April 2022)
|
||||||
|
- [#746](https://github.com/WireMock-Net/WireMock.Net/pull/746) - Allow Timeout.InfiniteTimeSpan for WithDelay [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#747](https://github.com/WireMock-Net/WireMock.Net/pull/747) - Update the logic for ProxyAndRecord contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#744](https://github.com/WireMock-Net/WireMock.Net/issues/744) - System.ArgumentOutOfRangeException when Timeout.InfiniteTimeSpan used as an argument for IResponseBuilder.WithDelay() [bug]
|
||||||
|
|
||||||
|
# 1.4.40 (26 March 2022)
|
||||||
|
- [#740](https://github.com/WireMock-Net/WireMock.Net/pull/740) - Add Port and Url property to WireMockServer + upgrade System.Linq.Dynamic.Core [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.4.39 (25 March 2022)
|
||||||
|
- [#739](https://github.com/WireMock-Net/WireMock.Net/pull/739) - Upgrade NuGet for RandomDataGenerator.Net to 1.0.14 contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.4.38 (11 March 2022)
|
||||||
|
- [#736](https://github.com/WireMock-Net/WireMock.Net/pull/736) - Remove interface for all Setting classes [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#737](https://github.com/WireMock-Net/WireMock.Net/pull/737) - Add WireMock.Net.WebApplication.NET6 example contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
# 1.4.37 (02 March 2022)
|
# 1.4.37 (02 March 2022)
|
||||||
- [#730](https://github.com/WireMock-Net/WireMock.Net/pull/730) - Fixed bug "dotnet nuget push -n" [bug] contributed by [StefH](https://github.com/StefH)
|
- [#730](https://github.com/WireMock-Net/WireMock.Net/pull/730) - Fixed bug "dotnet nuget push -n" [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#732](https://github.com/WireMock-Net/WireMock.Net/pull/732) - Make X509CertificatePassword optional [feature] contributed by [StefH](https://github.com/StefH)
|
- [#732](https://github.com/WireMock-Net/WireMock.Net/pull/732) - Make X509CertificatePassword optional [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
@@ -788,7 +828,7 @@
|
|||||||
- [#58](https://github.com/WireMock-Net/WireMock.Net/issues/58) - Multiple headers with same name [feature]
|
- [#58](https://github.com/WireMock-Net/WireMock.Net/issues/58) - Multiple headers with same name [feature]
|
||||||
|
|
||||||
# 1.0.2.5 (24 October 2017)
|
# 1.0.2.5 (24 October 2017)
|
||||||
- [#55](https://github.com/WireMock-Net/WireMock.Net/pull/55) - Fix the problem with headers passthrough [bug] contributed by [deeptowncitizen](https://github.com/deeptowncitizen)
|
- [#55](https://github.com/WireMock-Net/WireMock.Net/pull/55) - Fix the problem with headers passthrough [bug] contributed by [dmtrrk](https://github.com/dmtrrk)
|
||||||
- [#44](https://github.com/WireMock-Net/WireMock.Net/issues/44) - Bug: Server not listening after Start() returns (on macOS) [bug]
|
- [#44](https://github.com/WireMock-Net/WireMock.Net/issues/44) - Bug: Server not listening after Start() returns (on macOS) [bug]
|
||||||
- [#48](https://github.com/WireMock-Net/WireMock.Net/issues/48) - Stateful support [feature]
|
- [#48](https://github.com/WireMock-Net/WireMock.Net/issues/48) - Stateful support [feature]
|
||||||
- [#52](https://github.com/WireMock-Net/WireMock.Net/issues/52) - SimMetrics.NET error when trying to install NuGet Package
|
- [#52](https://github.com/WireMock-Net/WireMock.Net/issues/52) - SimMetrics.NET error when trying to install NuGet Package
|
||||||
@@ -800,7 +840,7 @@
|
|||||||
- [#40](https://github.com/WireMock-Net/WireMock.Net/pull/40) - Expose more settings to stand-alone app contributed by [StefH](https://github.com/StefH)
|
- [#40](https://github.com/WireMock-Net/WireMock.Net/pull/40) - Expose more settings to stand-alone app contributed by [StefH](https://github.com/StefH)
|
||||||
- [#41](https://github.com/WireMock-Net/WireMock.Net/pull/41) - Dotnet 20 preview final [feature] contributed by [StefH](https://github.com/StefH)
|
- [#41](https://github.com/WireMock-Net/WireMock.Net/pull/41) - Dotnet 20 preview final [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#45](https://github.com/WireMock-Net/WireMock.Net/pull/45) - Add RequestLogExpirationDuration and MaxRequestLogCount (#43) contributed by [StefH](https://github.com/StefH)
|
- [#45](https://github.com/WireMock-Net/WireMock.Net/pull/45) - Add RequestLogExpirationDuration and MaxRequestLogCount (#43) contributed by [StefH](https://github.com/StefH)
|
||||||
- [#51](https://github.com/WireMock-Net/WireMock.Net/pull/51) - Observable logs contributed by [deeptowncitizen](https://github.com/deeptowncitizen)
|
- [#51](https://github.com/WireMock-Net/WireMock.Net/pull/51) - Observable logs contributed by [dmtrrk](https://github.com/dmtrrk)
|
||||||
- [#15](https://github.com/WireMock-Net/WireMock.Net/issues/15) - New feature: Proxying [feature]
|
- [#15](https://github.com/WireMock-Net/WireMock.Net/issues/15) - New feature: Proxying [feature]
|
||||||
- [#31](https://github.com/WireMock-Net/WireMock.Net/issues/31) - Feature request: Nuget package for standalone version [feature]
|
- [#31](https://github.com/WireMock-Net/WireMock.Net/issues/31) - Feature request: Nuget package for standalone version [feature]
|
||||||
- [#33](https://github.com/WireMock-Net/WireMock.Net/issues/33) - Issue with launching sample code (StandAlone server) [bug]
|
- [#33](https://github.com/WireMock-Net/WireMock.Net/issues/33) - Issue with launching sample code (StandAlone server) [bug]
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.4.37</VersionPrefix>
|
<VersionPrefix>1.5.1</VersionPrefix>
|
||||||
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
|
||||||
<PackageIcon>WireMock.Net-Logo.png</PackageIcon>
|
<PackageIcon>WireMock.Net-Logo.png</PackageIcon>
|
||||||
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
||||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||||
@@ -13,6 +12,8 @@
|
|||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
|
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
|
||||||
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
|
<LangVersion>Latest</LangVersion>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
|
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
|
||||||
@@ -24,6 +25,10 @@
|
|||||||
<!--<None Include="../../PackageReadme.md" Pack="true" PackagePath=""/>-->
|
<!--<None Include="../../PackageReadme.md" Pack="true" PackagePath=""/>-->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(TargetFramework)' != 'net45'">
|
||||||
|
<!--<Nullable>enable</Nullable>-->
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<Choose>
|
<Choose>
|
||||||
<!-- The environment variable `Prerelease` is set in the azure-pipelines.yml file. -->
|
<!-- The environment variable `Prerelease` is set in the azure-pipelines.yml file. -->
|
||||||
<When Condition=" '$(Prerelease)' != '' ">
|
<When Condition=" '$(Prerelease)' != '' ">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
rem https://github.com/StefH/GitHubReleaseNotes
|
rem https://github.com/StefH/GitHubReleaseNotes
|
||||||
|
|
||||||
SET version=1.4.37
|
SET version=1.5.1
|
||||||
|
|
||||||
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc duplicate --version %version% --token %GH_TOKEN%
|
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc duplicate --version %version% --token %GH_TOKEN%
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# 1.4.37 (02 March 2022)
|
# 1.5.1 (08 July 2022)
|
||||||
- #730 Fixed bug "dotnet nuget push -n" [bug]
|
- #762 Bump Newtonsoft.Json from 11.0.2 to 13.0.1 in /examples/WireMock.Net.WebApplication.NETCore2 [dependencies]
|
||||||
- #732 Make X509CertificatePassword optional [feature]
|
- #763 Bump Newtonsoft.Json from 6.0.1 to 13.0.1 in /examples/WireMock.Net.Client.Net472 [dependencies]
|
||||||
- #733 Fix FileSystemWatcher [bug]
|
- #765 Update WireMock.Org.Abstractions and WireMock.Org.RestClient [feature]
|
||||||
- #726 Wiremock - WatchStaticMappings only works until the first request is made [bug]
|
- #766 Bump Microsoft.AspNetCore.Http from 2.1.1 to 2.1.22 in /examples/WireMock.Net.StandAlone.Net461 [dependencies]
|
||||||
|
- #767 Rename (WireMock.Pact.Models.V2)-Request to PactRequest and -Response to PactResponse [feature]
|
||||||
|
- #764 Wrong mapping of method GetAdminMappingsAsync from IWireMockOrgApi [bug]
|
||||||
|
|
||||||
The full release notes can be found here: https://github.com/WireMock-Net/WireMock.Net/blob/master/CHANGELOG.md
|
The full release notes can be found here: https://github.com/WireMock-Net/WireMock.Net/blob/master/CHANGELOG.md
|
||||||
@@ -29,7 +29,7 @@ For more info, see also this WIKI page: [What is WireMock.Net](https://github.co
|
|||||||
|
|
||||||
### NuGet packages
|
### NuGet packages
|
||||||
|
|
||||||
| | Official | Preview |
|
| | Official | Preview [:information_source:](https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions) |
|
||||||
| - | - | - |
|
| - | - | - |
|
||||||
| **WireMock.Net** | [](https://www.nuget.org/packages/WireMock.Net) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net)
|
| **WireMock.Net** | [](https://www.nuget.org/packages/WireMock.Net) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net)
|
||||||
| **WireMock.Net.StandAlone** | [](https://www.nuget.org/packages/WireMock.Net.StandAlone) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.StandAlone)
|
| **WireMock.Net.StandAlone** | [](https://www.nuget.org/packages/WireMock.Net.StandAlone) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.StandAlone)
|
||||||
@@ -37,6 +37,7 @@ For more info, see also this WIKI page: [What is WireMock.Net](https://github.co
|
|||||||
| **WireMock.Net.Matchers.CSharpCode** | [](https://www.nuget.org/packages/WireMock.Net.Matchers.CSharpCode) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.Matchers.CSharpCode)
|
| **WireMock.Net.Matchers.CSharpCode** | [](https://www.nuget.org/packages/WireMock.Net.Matchers.CSharpCode) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.Matchers.CSharpCode)
|
||||||
| **WireMock.Net.OpenApiParser** | [](https://www.nuget.org/packages/WireMock.Net.OpenApiParser) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.OpenApiParser)
|
| **WireMock.Net.OpenApiParser** | [](https://www.nuget.org/packages/WireMock.Net.OpenApiParser) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.OpenApiParser)
|
||||||
| **WireMock.Net.RestClient** | [](https://www.nuget.org/packages/WireMock.Net.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.RestClient)
|
| **WireMock.Net.RestClient** | [](https://www.nuget.org/packages/WireMock.Net.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.RestClient)
|
||||||
|
| **WireMock.Net.xUnit** | [](https://www.nuget.org/packages/WireMock.Net.xUnit) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.xUnit)
|
||||||
| **WireMock.Org.RestClient** | [](https://www.nuget.org/packages/WireMock.Org.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Org.RestClient)
|
| **WireMock.Org.RestClient** | [](https://www.nuget.org/packages/WireMock.Org.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Org.RestClient)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Client", "exam
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp", "examples\WireMock.Net.Console.NETCoreApp\WireMock.Net.Console.NETCoreApp.csproj", "{FE281639-B014-4C8A-96FA-141164A74713}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp", "examples\WireMock.Net.Console.NETCoreApp\WireMock.Net.Console.NETCoreApp.csproj", "{FE281639-B014-4C8A-96FA-141164A74713}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.Proxy.NETCoreApp", "examples\WireMock.Net.Console.Record.NETCoreApp\WireMock.Net.Console.Proxy.NETCoreApp.csproj", "{1995E414-F197-4AB4-90C2-68D806B5AF59}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.StandAlone.NETCoreApp", "examples\WireMock.Net.StandAlone.NETCoreApp\WireMock.Net.StandAlone.NETCoreApp.csproj", "{10E16614-61CA-48D8-8BDD-664C13913DED}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.StandAlone.NETCoreApp", "examples\WireMock.Net.StandAlone.NETCoreApp\WireMock.Net.StandAlone.NETCoreApp.csproj", "{10E16614-61CA-48D8-8BDD-664C13913DED}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.StandAlone.Net452", "examples\WireMock.Net.StandAlone.Net452\WireMock.Net.StandAlone.Net452.csproj", "{668F689E-57B4-422E-8846-C0FF643CA999}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.StandAlone.Net452", "examples\WireMock.Net.StandAlone.Net452\WireMock.Net.StandAlone.Net452.csproj", "{668F689E-57B4-422E-8846-C0FF643CA999}"
|
||||||
@@ -99,6 +97,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Org.Abstractions",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET6", "examples\WireMock.Net.Console.NET6\WireMock.Net.Console.NET6.csproj", "{2215055B-594E-4C2F-99B2-6DF337F02893}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET6", "examples\WireMock.Net.Console.NET6\WireMock.Net.Console.NET6.csproj", "{2215055B-594E-4C2F-99B2-6DF337F02893}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.WebApplication.NET6", "examples\WireMock.Net.WebApplication.NET6\WireMock.Net.WebApplication.NET6.csproj", "{3F7AA023-6833-4856-A08A-4B5717B592B8}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.Proxy.NETCoreApp", "examples\WireMock.Net.Console.Proxy.NETCoreApp\WireMock.Net.Console.Proxy.NETCoreApp.csproj", "{670C7562-C154-442E-A249-7D26849BCD13}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.xUnit", "src\WireMock.Net.xUnit\WireMock.Net.xUnit.csproj", "{0DE0954F-8C00-4E8D-B94A-4361FC1CBE44}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -141,10 +145,6 @@ Global
|
|||||||
{FE281639-B014-4C8A-96FA-141164A74713}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.Build.0 = Release|Any CPU
|
{FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -233,6 +233,18 @@ Global
|
|||||||
{2215055B-594E-4C2F-99B2-6DF337F02893}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.Build.0 = Release|Any CPU
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3F7AA023-6833-4856-A08A-4B5717B592B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3F7AA023-6833-4856-A08A-4B5717B592B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3F7AA023-6833-4856-A08A-4B5717B592B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3F7AA023-6833-4856-A08A-4B5717B592B8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{670C7562-C154-442E-A249-7D26849BCD13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{670C7562-C154-442E-A249-7D26849BCD13}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{670C7562-C154-442E-A249-7D26849BCD13}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{670C7562-C154-442E-A249-7D26849BCD13}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0DE0954F-8C00-4E8D-B94A-4361FC1CBE44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0DE0954F-8C00-4E8D-B94A-4361FC1CBE44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0DE0954F-8C00-4E8D-B94A-4361FC1CBE44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0DE0954F-8C00-4E8D-B94A-4361FC1CBE44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -247,7 +259,6 @@ Global
|
|||||||
{41C19451-E980-4ED4-A011-DA7A1C23FC05} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{41C19451-E980-4ED4-A011-DA7A1C23FC05} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{74D91AD0-D96D-4FD2-AEC5-CC49D38346C0} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{74D91AD0-D96D-4FD2-AEC5-CC49D38346C0} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{FE281639-B014-4C8A-96FA-141164A74713} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{FE281639-B014-4C8A-96FA-141164A74713} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{10E16614-61CA-48D8-8BDD-664C13913DED} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA999} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{668F689E-57B4-422E-8846-C0FF643CA999} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{26433A8F-BF01-4962-97EB-81BFFBB61096} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{26433A8F-BF01-4962-97EB-81BFFBB61096} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
@@ -272,6 +283,9 @@ Global
|
|||||||
{08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
{08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
{3BA5109E-5F30-4CC2-B699-02EC82560AA6} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
{3BA5109E-5F30-4CC2-B699-02EC82560AA6} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
{2215055B-594E-4C2F-99B2-6DF337F02893} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{2215055B-594E-4C2F-99B2-6DF337F02893} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
|
{3F7AA023-6833-4856-A08A-4B5717B592B8} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
|
{670C7562-C154-442E-A249-7D26849BCD13} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
|
{0DE0954F-8C00-4E8D-B94A-4361FC1CBE44} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
|
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=guidb/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=guidb/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Heyenrath/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Heyenrath/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Jmes/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Jmes/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Pacticipant/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Raml/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Raml/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=randomizer/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=randomizer/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Scriban/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Scriban/@EntryIndexedValue">True</s:Boolean>
|
||||||
@@ -23,4 +24,6 @@
|
|||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Victoor/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Victoor/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhook/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhook/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhooks/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhooks/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=wiremockserver/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=xunit/@EntryIndexedValue">True</s:Boolean>
|
||||||
</wpf:ResourceDictionary>
|
</wpf:ResourceDictionary>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Brutal.Dev.StrongNameSigner" version="2.7.1" targetFramework="net472" />
|
<package id="Brutal.Dev.StrongNameSigner" version="2.7.1" targetFramework="net472" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.1" targetFramework="net472" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||||
<package id="RestEase" version="1.4.10" targetFramework="net472" />
|
<package id="RestEase" version="1.4.10" targetFramework="net472" />
|
||||||
<package id="WireMock.Net.Abstractions" version="1.2.0" targetFramework="net472" />
|
<package id="WireMock.Net.Abstractions" version="1.2.0" targetFramework="net472" />
|
||||||
<package id="WireMock.Net.RestClient" version="1.2.0" targetFramework="net472" />
|
<package id="WireMock.Net.RestClient" version="1.2.0" targetFramework="net472" />
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="RestEase" Version="1.5.5" />
|
<PackageReference Include="RestEase" Version="1.5.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.14" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.14" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.14" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.13" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.14" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -69,6 +69,12 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
File.WriteAllBytes(AdjustPath(path), bytes);
|
File.WriteAllBytes(AdjustPath(path), bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void WriteFile(string folder, string filename, byte[] bytes)
|
||||||
|
{
|
||||||
|
File.WriteAllBytes(Path.Combine(folder, filename), bytes);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.DeleteFile"/>
|
/// <inheritdoc cref="IFileSystemHandler.DeleteFile"/>
|
||||||
public void DeleteFile(string path)
|
public void DeleteFile(string path)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
|
|
||||||
// server.AllowPartialMapping();
|
// server.AllowPartialMapping();
|
||||||
|
|
||||||
server.Given(Request.Create().WithPath("/mypath").UsingPost())
|
server.Given(Request.Create().WithPath(MatchOperator.Or, "/mypath", "/mypath1", "/mypath2").UsingPost())
|
||||||
.RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
.WithHeader("Content-Type", "application/json")
|
.WithHeader("Content-Type", "application/json")
|
||||||
.WithBodyAsJson("{{JsonPath.SelectToken request.body \"..name\"}}")
|
.WithBodyAsJson("{{JsonPath.SelectToken request.body \"..name\"}}")
|
||||||
@@ -89,6 +89,8 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
server
|
server
|
||||||
.Given(Request.Create().WithPath(p => p.Contains("x")).UsingGet())
|
.Given(Request.Create().WithPath(p => p.Contains("x")).UsingGet())
|
||||||
.AtPriority(4)
|
.AtPriority(4)
|
||||||
|
.WithTitle("t")
|
||||||
|
.WithDescription("d")
|
||||||
.RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
.WithStatusCode(200)
|
.WithStatusCode(200)
|
||||||
.WithHeader("Content-Type", "application/json")
|
.WithHeader("Content-Type", "application/json")
|
||||||
|
|||||||
@@ -39,14 +39,14 @@
|
|||||||
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars, Version=2.1.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.0\lib\net452\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net452\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.3.2.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.2\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.5\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
@@ -55,8 +55,8 @@
|
|||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.3.0" targetFramework="net452" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net" version="2.1.0" targetFramework="net452" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.3.2" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers" version="2.3.5" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.3.3" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.5" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
|
|||||||
@@ -38,23 +38,23 @@
|
|||||||
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars, Version=2.1.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.0\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.3.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.1\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.5\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.3.0" targetFramework="net461" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net" version="2.1.0" targetFramework="net461" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.3.1" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers" version="2.3.5" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.3.3" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.5" targetFramework="net461" />
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net461" />
|
<package id="log4net" version="2.0.14" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
@@ -51,11 +51,31 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.3.0" newVersion="2.3.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.3.5.0" newVersion="2.3.5.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="XPath2" publicKeyToken="463c6d7fb740c7e5" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-1.1.3.0" newVersion="1.1.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.5.1" newVersion="4.0.5.1" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Handlebars.Net.Helpers" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.3.5.0" newVersion="2.3.5.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Linq.Dynamic.Core" publicKeyToken="0f07ec44de6ac832" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-1.2.18.0" newVersion="1.2.18.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Fare" publicKeyToken="ea68d375bf33a7c8" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -42,23 +42,44 @@
|
|||||||
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Fare, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ea68d375bf33a7c8, processorArchitecture=MSIL">
|
<Reference Include="Fare, Version=2.2.0.0, Culture=neutral, PublicKeyToken=ea68d375bf33a7c8, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Fare.2.1.2\lib\net35\Fare.dll</HintPath>
|
<HintPath>..\..\packages\Fare.2.2.0\lib\net35\Fare.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars, Version=2.1.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.0\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.3.2.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.2\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.5\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.DynamicLinq, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.DynamicLinq.2.3.3\lib\net452\HandlebarsDotNet.Helpers.DynamicLinq.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Humanizer, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Humanizer.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Humanizer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Json, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Json.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Random, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Random.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Random.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Xeger, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Xeger.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Xeger.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.XPath, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.XPath.2.3.3\lib\net452\HandlebarsDotNet.Helpers.XPath.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Humanizer, Version=2.14.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Humanizer.Core.2.14.1\lib\netstandard2.0\Humanizer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="JmesPath.Net, Version=1.0.125.0, Culture=neutral, PublicKeyToken=b29d616b7f4faff0, processorArchitecture=MSIL">
|
<Reference Include="JmesPath.Net, Version=1.0.125.0, Culture=neutral, PublicKeyToken=b29d616b7f4faff0, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\JmesPath.Net.1.0.125\lib\net45\JmesPath.Net.dll</HintPath>
|
<HintPath>..\..\packages\JmesPath.Net.1.0.125\lib\net45\JmesPath.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
||||||
@@ -207,14 +228,29 @@
|
|||||||
<Reference Include="Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.IdentityModel.JsonWebTokens.6.12.2\lib\net472\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IdentityModel.Logging, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Logging.6.12.2\lib\net472\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IdentityModel.Protocols, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Protocols.6.12.2\lib\net472\Microsoft.IdentityModel.Protocols.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.6.12.2\lib\net472\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IdentityModel.Tokens, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Tokens.6.12.2\lib\net472\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.Net.Http.Headers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Net.Http.Headers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RandomDataGenerator, Version=1.0.12.0, Culture=neutral, PublicKeyToken=ae5c571d29a3b8d9, processorArchitecture=MSIL">
|
<Reference Include="RandomDataGenerator, Version=1.0.13.0, Culture=neutral, PublicKeyToken=ae5c571d29a3b8d9, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\RandomDataGenerator.Net.1.0.12\lib\net45\RandomDataGenerator.dll</HintPath>
|
<HintPath>..\..\packages\RandomDataGenerator.Net.1.0.14\lib\net45\RandomDataGenerator.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Scriban.Signed, Version=2.1.4.0, Culture=neutral, PublicKeyToken=5675fb69b15f2433, processorArchitecture=MSIL">
|
<Reference Include="Scriban.Signed, Version=2.1.4.0, Culture=neutral, PublicKeyToken=5675fb69b15f2433, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Scriban.Signed.2.1.4\lib\net45\Scriban.Signed.dll</HintPath>
|
<HintPath>..\..\packages\Scriban.Signed.2.1.4\lib\net45\Scriban.Signed.dll</HintPath>
|
||||||
@@ -222,6 +258,9 @@
|
|||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Stef.Validation, Version=0.1.0.0, Culture=neutral, PublicKeyToken=8f3400880c321038, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Stef.Validation.0.1.0\lib\net40\Stef.Validation.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
<HintPath>..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
@@ -238,11 +277,14 @@
|
|||||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.IdentityModel.Tokens.Jwt.6.12.2\lib\net472\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IO.Pipelines.4.5.3\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
<HintPath>..\..\packages\System.IO.Pipelines.4.5.3\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.16.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.18.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.16\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.18\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
<HintPath>..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
@@ -264,8 +306,8 @@
|
|||||||
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
<HintPath>..\..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Text.Encodings.Web, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Text.Encodings.Web.4.5.0\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
|
<HintPath>..\..\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
@@ -280,11 +322,23 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="XPath2, Version=1.1.0.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
<Reference Include="TinyMapper, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\XPath2.1.1.0\lib\net40\XPath2.dll</HintPath>
|
<HintPath>..\..\packages\TinyMapper.3.0.3\lib\net40\TinyMapper.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="XPath2.Extensions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
<Reference Include="WireMock.Net, Version=1.4.41.0, Culture=neutral, PublicKeyToken=c8d65537854e1f03, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\XPath2.Extensions.1.1.0\lib\net40\XPath2.Extensions.dll</HintPath>
|
<HintPath>..\..\packages\WireMock.Net.1.4.41\lib\net461\WireMock.Net.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="WireMock.Net.Abstractions, Version=1.4.41.0, Culture=neutral, PublicKeyToken=c8d65537854e1f03, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\WireMock.Net.Abstractions.1.4.41\lib\net451\WireMock.Net.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="WireMock.Org.Abstractions, Version=1.4.41.0, Culture=neutral, PublicKeyToken=c8d65537854e1f03, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\WireMock.Org.Abstractions.1.4.41\lib\net45\WireMock.Org.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="XPath2, Version=1.1.3.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\XPath2.1.1.3\lib\net452\XPath2.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="XPath2.Extensions, Version=1.1.3.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\XPath2.Extensions.1.1.3\lib\net452\XPath2.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -306,16 +360,6 @@
|
|||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj">
|
|
||||||
<Project>{b6269aac-170a-4346-8b9a-579ded3d9a94}</Project>
|
|
||||||
<Name>WireMock.Net.Abstractions</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
|
||||||
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
|
||||||
<Name>WireMock.Net</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -1,12 +1,68 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.3.0" targetFramework="net472" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net472" />
|
||||||
<package id="Fare" version="2.1.2" targetFramework="net472" />
|
<package id="Fare" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net" version="2.1.0" targetFramework="net472" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.3.2" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.3.3" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.5" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.DynamicLinq" version="2.3.3" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Humanizer" version="2.3.3" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Json" version="2.3.3" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Random" version="2.3.3" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Xeger" version="2.3.3" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.XPath" version="2.3.3" targetFramework="net472" />
|
||||||
|
<package id="Humanizer" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.af" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ar" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.az" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.bg" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.bn-BD" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.cs" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.da" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.de" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.el" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.es" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.fa" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.fi-FI" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.fr" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.fr-BE" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.he" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.hr" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.hu" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.hy" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.id" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.is" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.it" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ja" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ko-KR" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ku" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.lv" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ms-MY" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.mt" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.nb" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.nb-NO" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.nl" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.pl" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.pt" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ro" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.ru" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.sk" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.sl" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.sr" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.sr-Latn" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.sv" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.th-TH" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.tr" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.uk" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.uz-Cyrl-UZ" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.uz-Latn-UZ" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.vi" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.zh-CN" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.zh-Hans" version="2.14.1" targetFramework="net472" />
|
||||||
|
<package id="Humanizer.Core.zh-Hant" version="2.14.1" targetFramework="net472" />
|
||||||
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net472" />
|
<package id="log4net" version="2.0.14" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore.Authentication.Core" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore.Authentication.Core" version="2.2.0" targetFramework="net472" />
|
||||||
@@ -57,28 +113,37 @@
|
|||||||
<package id="Microsoft.Extensions.Options" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Options" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.Extensions.Primitives" version="5.0.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Primitives" version="5.0.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.12.2" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.IdentityModel.Logging" version="6.12.2" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.IdentityModel.Protocols" version="6.12.2" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.12.2" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.IdentityModel.Tokens" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||||
<package id="RandomDataGenerator.Net" version="1.0.12" targetFramework="net472" />
|
<package id="RandomDataGenerator.Net" version="1.0.14" targetFramework="net472" />
|
||||||
<package id="Scriban.Signed" version="2.1.4" targetFramework="net472" />
|
<package id="Scriban.Signed" version="2.1.4" targetFramework="net472" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
|
<package id="Stef.Validation" version="0.1.0" targetFramework="net472" />
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net472" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net472" />
|
||||||
<package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="net472" />
|
<package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net472" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net472" />
|
||||||
|
<package id="System.IdentityModel.Tokens.Jwt" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="System.IO.Pipelines" version="4.5.3" targetFramework="net472" />
|
<package id="System.IO.Pipelines" version="4.5.3" targetFramework="net472" />
|
||||||
<package id="System.Linq.Dynamic.Core" version="1.2.16" targetFramework="net472" />
|
<package id="System.Linq.Dynamic.Core" version="1.2.18" targetFramework="net472" />
|
||||||
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
|
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net472" />
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net472" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||||
<package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net472" />
|
<package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net472" />
|
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Text.Encodings.Web" version="4.5.1" targetFramework="net472" />
|
<package id="System.Text.Encodings.Web" version="4.7.2" targetFramework="net472" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net472" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net472" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="WireMock.Net" version="1.4.2" targetFramework="net472" />
|
<package id="TinyMapper" version="3.0.3" targetFramework="net472" />
|
||||||
<package id="WireMock.Net.Abstractions" version="1.4.2" targetFramework="net472" />
|
<package id="WireMock.Net" version="1.4.41" targetFramework="net472" />
|
||||||
<package id="XPath2" version="1.1.0" targetFramework="net472" />
|
<package id="WireMock.Net.Abstractions" version="1.4.41" targetFramework="net472" />
|
||||||
<package id="XPath2.Extensions" version="1.1.0" targetFramework="net472" />
|
<package id="WireMock.Org.Abstractions" version="1.4.41" targetFramework="net472" />
|
||||||
|
<package id="XPath2" version="1.1.3" targetFramework="net472" />
|
||||||
|
<package id="XPath2.Extensions" version="1.1.3" targetFramework="net472" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
{
|
||||||
|
"Guid": "501d5907-7f73-46dc-a1c6-1a48f39b103a",
|
||||||
|
"Title": "",
|
||||||
|
"Request": {
|
||||||
|
"Path": {
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "/post",
|
||||||
|
"IgnoreCase": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Methods": [
|
||||||
|
"POST"
|
||||||
|
],
|
||||||
|
"Headers": [
|
||||||
|
{
|
||||||
|
"Name": "Accept",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "*/*",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Connection",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "keep-alive",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Host",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "localhost:9091",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "User-Agent",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "PostmanRuntime/7.29.0",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Accept-Encoding",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "gzip, deflate, br",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Authorization",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "BASIC 1234",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Content-Type",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "application/vnd.contoso+json",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Content-Length",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "16",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "postmanecho",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "post",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Test123",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "application/vnd.contoso+json",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Body": {
|
||||||
|
"Matcher": {
|
||||||
|
"Name": "JsonMatcher",
|
||||||
|
"Pattern": {
|
||||||
|
"test": 42
|
||||||
|
},
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"StatusCode": 200,
|
||||||
|
"BodyAsJson": {
|
||||||
|
"args": {},
|
||||||
|
"data": {
|
||||||
|
"test": "Stef"
|
||||||
|
},
|
||||||
|
"files": {},
|
||||||
|
"form": {},
|
||||||
|
"headers": {
|
||||||
|
"x-forwarded-proto": "http",
|
||||||
|
"x-forwarded-port": "80",
|
||||||
|
"host": "postman-echo.com",
|
||||||
|
"x-amzn-trace-id": "Root=1-624a96e3-023cf5a15966164e7156c20d",
|
||||||
|
"content-length": "11",
|
||||||
|
"accept": "*/*",
|
||||||
|
"user-agent": "PostmanRuntime/7.29.0",
|
||||||
|
"accept-encoding": "gzip, deflate, br",
|
||||||
|
"authorization": "BASIC 1234",
|
||||||
|
"cookie": "sails.sid=s%3AMpD3hNdjm1Ilte_ml7vgmEopThEhwAbr.HDn7RFcO3qK7oVXIxK3Pxk23g1qHDrNZIN4NozK5oog",
|
||||||
|
"postmanecho": "post",
|
||||||
|
"test123": "application/vnd.contoso+json",
|
||||||
|
"postman-token": "050b1136-19ed-4fbe-ad2a-338a20237321",
|
||||||
|
"content-type": "application/vnd.contoso+json"
|
||||||
|
},
|
||||||
|
"json": {
|
||||||
|
"test": "Stef"
|
||||||
|
},
|
||||||
|
"url": "http://postman-echo.com/post"
|
||||||
|
},
|
||||||
|
"Headers": {
|
||||||
|
"Content-Type": "application/json; charset=utf-8",
|
||||||
|
"Content-Length": "663",
|
||||||
|
"Date": "Mon, 04 Apr 2022 06:57:39 GMT",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"ETag": "W/\"297-FimzXopdNUy6DBi49iOW6Tm9q0o\"",
|
||||||
|
"Vary": "Accept-Encoding",
|
||||||
|
"Set-Cookie": "sails.sid=s%3AhtpOsTOJqbHuXmMAZT6cyHLR6FBx1XhV.0loKIsdu5GJKgjJeha16NVWYl%2B0BvPeEQYHcLBCLJ20; Path=/; HttpOnly"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
53
examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs
Normal file
53
examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using WireMock.Logging;
|
||||||
|
using WireMock.RequestBuilders;
|
||||||
|
using WireMock.ResponseBuilders;
|
||||||
|
using WireMock.Server;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
|
namespace WireMock.Net.Console.Proxy.NETCoreApp;
|
||||||
|
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
static void Main(params string[] args)
|
||||||
|
{
|
||||||
|
var server = WireMockServer.Start(new WireMockServerSettings
|
||||||
|
{
|
||||||
|
Logger = new WireMockConsoleLogger(),
|
||||||
|
Urls = new[] { "http://localhost:9091/", "https://localhost:9443/" },
|
||||||
|
StartAdminInterface = true,
|
||||||
|
ReadStaticMappings = true,
|
||||||
|
WatchStaticMappings = true,
|
||||||
|
WatchStaticMappingsInSubdirectories = true,
|
||||||
|
ProxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
|
{
|
||||||
|
Url = "http://postman-echo.com/post",
|
||||||
|
SaveMapping = true,
|
||||||
|
SaveMappingToFile = true,
|
||||||
|
ExcludedHeaders = new[] { "Postman-Token" },
|
||||||
|
ExcludedCookies = new[] { "sails.sid" }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//server
|
||||||
|
// .Given(Request.Create().UsingGet())
|
||||||
|
// .RespondWith(Response.Create()
|
||||||
|
// .WithProxy(new ProxyAndRecordSettings
|
||||||
|
// {
|
||||||
|
// Url = "http://postman-echo.com/post",
|
||||||
|
// SaveMapping = true,
|
||||||
|
// SaveMappingToFile = true
|
||||||
|
// }));
|
||||||
|
|
||||||
|
System.Console.WriteLine("Press any key to stop the server");
|
||||||
|
System.Console.ReadKey();
|
||||||
|
server.Stop();
|
||||||
|
|
||||||
|
System.Console.WriteLine("Displaying all requests");
|
||||||
|
var allRequests = server.LogEntries;
|
||||||
|
System.Console.WriteLine(JsonConvert.SerializeObject(allRequests, Formatting.Indented));
|
||||||
|
|
||||||
|
System.Console.WriteLine("Press any key to quit");
|
||||||
|
System.Console.ReadKey();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -71,8 +71,8 @@
|
|||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
using Newtonsoft.Json;
|
|
||||||
using WireMock.RequestBuilders;
|
|
||||||
using WireMock.ResponseBuilders;
|
|
||||||
using WireMock.Server;
|
|
||||||
using WireMock.Settings;
|
|
||||||
|
|
||||||
namespace WireMock.Net.Console.Proxy.NETCoreApp
|
|
||||||
{
|
|
||||||
static class Program
|
|
||||||
{
|
|
||||||
static void Main(params string[] args)
|
|
||||||
{
|
|
||||||
var server = WireMockServer.Start(new WireMockServerSettings
|
|
||||||
{
|
|
||||||
Urls = new[] { "http://localhost:9091/", "https://localhost:9443/" },
|
|
||||||
StartAdminInterface = true,
|
|
||||||
ReadStaticMappings = false,
|
|
||||||
//ProxyAndRecordSettings = new ProxyAndRecordSettings
|
|
||||||
//{
|
|
||||||
// Url = "https://www.google.com",
|
|
||||||
// //ClientX509Certificate2ThumbprintOrSubjectName = "www.yourclientcertname.com OR yourcertificatethumbprint (only if the service you're proxying to requires it)",
|
|
||||||
// SaveMapping = true,
|
|
||||||
// SaveMappingToFile = false,
|
|
||||||
// ExcludedHeaders = new [] { "dnt", "Content-Length" }
|
|
||||||
//}
|
|
||||||
});
|
|
||||||
|
|
||||||
server
|
|
||||||
.Given(Request.Create().UsingGet())
|
|
||||||
.RespondWith(Response.Create()
|
|
||||||
.WithProxy(new ProxyAndRecordSettings
|
|
||||||
{
|
|
||||||
Url = "http://postman-echo.com/post",
|
|
||||||
SaveMapping = true,
|
|
||||||
SaveMappingToFile = true
|
|
||||||
}));
|
|
||||||
|
|
||||||
System.Console.WriteLine("Press any key to stop the server");
|
|
||||||
System.Console.ReadKey();
|
|
||||||
server.Stop();
|
|
||||||
|
|
||||||
System.Console.WriteLine("Displaying all requests");
|
|
||||||
var allRequests = server.LogEntries;
|
|
||||||
System.Console.WriteLine(JsonConvert.SerializeObject(allRequests, Formatting.Indented));
|
|
||||||
|
|
||||||
System.Console.WriteLine("Press any key to quit");
|
|
||||||
System.Console.ReadKey();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +1,23 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.OpenApi.Models;
|
|
||||||
using RandomDataGenerator.FieldOptions;
|
using RandomDataGenerator.FieldOptions;
|
||||||
using RandomDataGenerator.Randomizers;
|
using RandomDataGenerator.Randomizers;
|
||||||
using WireMock.Net.OpenApiParser.Settings;
|
using WireMock.Net.OpenApiParser.Settings;
|
||||||
|
|
||||||
namespace WireMock.Net.OpenApiParser.ConsoleApp
|
namespace WireMock.Net.OpenApiParser.ConsoleApp;
|
||||||
{
|
|
||||||
public class DynamicDataGeneration : WireMockOpenApiParserDynamicExampleValues
|
|
||||||
{
|
|
||||||
public override string String
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
//Since you have your Schema, you can get if max-lenght is set. You can generate accurate examples with this settings
|
|
||||||
var maxLength = this.Schema.MaxLength ?? 9;
|
|
||||||
|
|
||||||
return RandomizerFactory.GetRandomizer(new FieldOptionsTextRegex
|
public class DynamicDataGeneration : WireMockOpenApiParserDynamicExampleValues
|
||||||
{
|
{
|
||||||
Pattern = $"[0-9A-Z]{{{maxLength}}}"
|
public override string String
|
||||||
}).Generate() ?? "example-string";
|
{
|
||||||
}
|
get
|
||||||
set { }
|
{
|
||||||
|
// Since you have your Schema, you can get if max-length is set. You can generate accurate examples with this settings
|
||||||
|
var maxLength = Schema.MaxLength ?? 9;
|
||||||
|
|
||||||
|
return RandomizerFactory.GetRandomizer(new FieldOptionsTextRegex
|
||||||
|
{
|
||||||
|
Pattern = $"[0-9A-Z]{{{maxLength}}}"
|
||||||
|
}).Generate() ?? "example-string";
|
||||||
}
|
}
|
||||||
|
set { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: Basic-String-Test
|
||||||
|
description: Basic string test
|
||||||
|
version: "4.5.2"
|
||||||
|
servers:
|
||||||
|
- url: https://localhost/examples
|
||||||
|
paths:
|
||||||
|
/string/basic:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test
|
||||||
|
operationId: getBasicString1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/string/maxlenght/minlenght:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with maxlength and minlength properties
|
||||||
|
operationId: getBasicString2
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
maxLength: 8
|
||||||
|
minLength: 8
|
||||||
|
/string/maxlenght:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with maxlength property
|
||||||
|
operationId: getBasicString3
|
||||||
|
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
maxLength: 5
|
||||||
|
/string/minlenght:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with minlength property
|
||||||
|
operationId: getBasicString
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
minLength: 10
|
||||||
|
/string/enum:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with enum property
|
||||||
|
operationId: getBasicString4
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- response1
|
||||||
|
- response2
|
||||||
|
/string/pattern/uri:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with uri pattern property
|
||||||
|
operationId: getBasicString5
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
pattern: '^(http|https|ftp|sftp)://((([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9]))\.){3}([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9]))|((www\.|())[a-z0-9]{2,5}\.([a-z]{2,3}((\.[a-z]{2})|()))))(()|(:((102[5-9])|(1[0-9][3-9][0-9])|(1[1-9][0-9]{2})|([2-9][0-9]{3})|([2-5][0-9]{4})|(1[0-9]{4})|(60000))))$'
|
||||||
|
/string/pattern/ipv4:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with ipv4 pattern property
|
||||||
|
operationId: getBasicString6
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
pattern: '^(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9]))\.){3}([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9]))$'
|
||||||
|
/string/header/ipv4:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- basic-string
|
||||||
|
description: Basic string test with ipv4 pattern property
|
||||||
|
operationId: getBasicString7
|
||||||
|
parameters:
|
||||||
|
- name: Header-Sample
|
||||||
|
in: header
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
pattern: "ipv4 pattern"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
pattern: '^(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9]))\.){3}([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9]))$'
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.0.2",
|
||||||
|
"info": {
|
||||||
|
"title": "Swagger Petstore - OpenAPI 3.0",
|
||||||
|
"description": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)",
|
||||||
|
"termsOfService": "http://swagger.io/terms/",
|
||||||
|
"contact": { "email": "apiteam@swagger.io" },
|
||||||
|
"license": {
|
||||||
|
"name": "Apache 2.0",
|
||||||
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
|
},
|
||||||
|
"version": "1.0.11"
|
||||||
|
},
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more about Swagger",
|
||||||
|
"url": "http://swagger.io"
|
||||||
|
},
|
||||||
|
"servers": [ { "url": "/api/v3" } ],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "pet",
|
||||||
|
"description": "Everything about your Pets",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more",
|
||||||
|
"url": "http://swagger.io"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "store",
|
||||||
|
"description": "Access to Petstore orders",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more about our store",
|
||||||
|
"url": "http://swagger.io"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "user",
|
||||||
|
"description": "Operations about user"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"/pet": {
|
||||||
|
"put": {
|
||||||
|
"tags": [ "pet" ],
|
||||||
|
"summary": "Update an existing pet",
|
||||||
|
"description": "Update an existing pet by Id",
|
||||||
|
"operationId": "updatePet",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "api_key",
|
||||||
|
"in": "header",
|
||||||
|
"description": "",
|
||||||
|
"required": true,
|
||||||
|
"schema": { "type": "string" }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Update an existent pet in the store",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": { "$ref": "#/components/schemas/Pet" }
|
||||||
|
},
|
||||||
|
"application/xml": {
|
||||||
|
"schema": { "$ref": "#/components/schemas/Pet" }
|
||||||
|
},
|
||||||
|
"application/x-www-form-urlencoded": {
|
||||||
|
"schema": { "$ref": "#/components/schemas/Pet" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/xml": {
|
||||||
|
"schema": { "$ref": "#/components/schemas/Pet" }
|
||||||
|
},
|
||||||
|
"application/json": {
|
||||||
|
"schema": { "$ref": "#/components/schemas/Pet" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": { "description": "Invalid ID supplied" },
|
||||||
|
"404": { "description": "Pet not found" },
|
||||||
|
"405": { "description": "Validation exception" }
|
||||||
|
},
|
||||||
|
"security": [ { "petstore_auth": [ "write:pets", "read:pets" ] } ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"Category": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Dogs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": { "name": "category" }
|
||||||
|
},
|
||||||
|
"Tag": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"name": { "type": "string" }
|
||||||
|
},
|
||||||
|
"xml": { "name": "tag" }
|
||||||
|
},
|
||||||
|
"Pet": {
|
||||||
|
"required": [ "name", "photoUrls" ],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "doggie"
|
||||||
|
},
|
||||||
|
"category": { "$ref": "#/components/schemas/Category" },
|
||||||
|
"photoUrls": {
|
||||||
|
"type": "array",
|
||||||
|
"xml": { "wrapped": true },
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"xml": { "name": "photoUrl" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "array",
|
||||||
|
"xml": { "wrapped": true },
|
||||||
|
"items": { "$ref": "#/components/schemas/Tag" }
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "pet status in the store",
|
||||||
|
"enum": [ "available", "pending", "sold" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": { "name": "pet" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
swagger: "2.0"
|
||||||
|
info:
|
||||||
|
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
|
||||||
|
version: "1.0.0"
|
||||||
|
title: "Swagger Petstore"
|
||||||
|
termsOfService: "http://swagger.io/terms/"
|
||||||
|
contact:
|
||||||
|
email: "apiteam@swagger.io"
|
||||||
|
license:
|
||||||
|
name: "Apache 2.0"
|
||||||
|
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
|
host: "petstore.swagger.io"
|
||||||
|
basePath: "/v2"
|
||||||
|
tags:
|
||||||
|
- name: "pet"
|
||||||
|
description: "Everything about your Pets"
|
||||||
|
externalDocs:
|
||||||
|
description: "Find out more"
|
||||||
|
url: "http://swagger.io"
|
||||||
|
- name: "store"
|
||||||
|
description: "Access to Petstore orders"
|
||||||
|
- name: "user"
|
||||||
|
description: "Operations about user"
|
||||||
|
externalDocs:
|
||||||
|
description: "Find out more about our store"
|
||||||
|
url: "http://swagger.io"
|
||||||
|
schemes:
|
||||||
|
- "https"
|
||||||
|
- "http"
|
||||||
|
paths:
|
||||||
|
/user/createWithList:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- "user"
|
||||||
|
summary: "Creates list of users with given input array"
|
||||||
|
description: ""
|
||||||
|
operationId: "createUsersWithListInput"
|
||||||
|
produces:
|
||||||
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
|
parameters:
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
description: "List of user object"
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: "array"
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/User"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: "successful operation"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/Order"
|
||||||
|
default:
|
||||||
|
description: "successful operation"
|
||||||
|
definitions:
|
||||||
|
Order:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
petId:
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
quantity:
|
||||||
|
type: "integer"
|
||||||
|
format: "int32"
|
||||||
|
shipDate:
|
||||||
|
type: "string"
|
||||||
|
format: "date-time"
|
||||||
|
status:
|
||||||
|
type: "string"
|
||||||
|
description: "Order Status"
|
||||||
|
enum:
|
||||||
|
- "placed"
|
||||||
|
- "approved"
|
||||||
|
- "delivered"
|
||||||
|
complete:
|
||||||
|
type: "boolean"
|
||||||
|
default: false
|
||||||
|
xml:
|
||||||
|
name: "Order"
|
||||||
|
Category:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
|
xml:
|
||||||
|
name: "Category"
|
||||||
|
User:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
username:
|
||||||
|
type: "string"
|
||||||
|
firstName:
|
||||||
|
type: "string"
|
||||||
|
lastName:
|
||||||
|
type: "string"
|
||||||
|
email:
|
||||||
|
type: "string"
|
||||||
|
password:
|
||||||
|
type: "string"
|
||||||
|
phone:
|
||||||
|
type: "string"
|
||||||
|
userStatus:
|
||||||
|
type: "integer"
|
||||||
|
format: "int32"
|
||||||
|
description: "User Status"
|
||||||
|
xml:
|
||||||
|
name: "User"
|
||||||
|
Tag:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
|
xml:
|
||||||
|
name: "Tag"
|
||||||
|
Pet:
|
||||||
|
type: "object"
|
||||||
|
required:
|
||||||
|
- "name"
|
||||||
|
- "photoUrls"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
category:
|
||||||
|
$ref: "#/definitions/Category"
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
|
example: "doggie"
|
||||||
|
photoUrls:
|
||||||
|
type: "array"
|
||||||
|
xml:
|
||||||
|
name: "photoUrl"
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
type: "string"
|
||||||
|
tags:
|
||||||
|
type: "array"
|
||||||
|
xml:
|
||||||
|
name: "tag"
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/Tag"
|
||||||
|
status:
|
||||||
|
type: "string"
|
||||||
|
description: "pet status in the store"
|
||||||
|
enum:
|
||||||
|
- "available"
|
||||||
|
- "pending"
|
||||||
|
- "sold"
|
||||||
|
xml:
|
||||||
|
name: "Pet"
|
||||||
|
ApiResponse:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: "integer"
|
||||||
|
format: "int32"
|
||||||
|
type:
|
||||||
|
type: "string"
|
||||||
|
message:
|
||||||
|
type: "string"
|
||||||
|
externalDocs:
|
||||||
|
description: "Find out more about Swagger"
|
||||||
|
url: "http://swagger.io"
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.0.2",
|
||||||
|
"info": {
|
||||||
|
"title": "Swagger Petstore - OpenAPI 3.0",
|
||||||
|
"description": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml) ",
|
||||||
|
"termsOfService": "http://swagger.io/terms/",
|
||||||
|
"contact": { "email": "apiteam@swagger.io" },
|
||||||
|
"license": {
|
||||||
|
"name": "Apache 2.0",
|
||||||
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
|
},
|
||||||
|
"version": "1.0.4"
|
||||||
|
},
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more about Swagger",
|
||||||
|
"url": "http://swagger.io"
|
||||||
|
},
|
||||||
|
"servers": [ { "url": "/api/v3" } ],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "pet",
|
||||||
|
"description": "Everything about your Pets",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more",
|
||||||
|
"url": "http://swagger.io"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "store",
|
||||||
|
"description": "Operations about user"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "user",
|
||||||
|
"description": "Access to Petstore orders",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more about our store",
|
||||||
|
"url": "http://swagger.io"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"/pet": {
|
||||||
|
"put": {
|
||||||
|
"tags": [ "pet" ],
|
||||||
|
"summary": "Update an existing pet",
|
||||||
|
"description": "Update an existing pet by Id",
|
||||||
|
"operationId": "updatePet",
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Update an existent pet in the store",
|
||||||
|
"content": {
|
||||||
|
"application/json": { "schema": { "$ref": "#/components/schemas/Pet" } },
|
||||||
|
"application/xml": { "schema": { "$ref": "#/components/schemas/Pet" } },
|
||||||
|
"application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Pet" } }
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/xml": { "schema": { "$ref": "#/components/schemas/Pet" } },
|
||||||
|
"application/json": { "schema": { "$ref": "#/components/schemas/Pet" } }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": { "description": "Invalid ID supplied" },
|
||||||
|
"404": { "description": "Pet not found" },
|
||||||
|
"405": { "description": "Validation exception" }
|
||||||
|
},
|
||||||
|
"security": [ { "petstore_auth": [ "write:pets", "read:pets" ] } ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"Category": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Dogs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": { "name": "category" }
|
||||||
|
},
|
||||||
|
"Tag": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"name": { "type": "string" }
|
||||||
|
},
|
||||||
|
"xml": { "name": "tag" }
|
||||||
|
},
|
||||||
|
"Pet": {
|
||||||
|
"required": [ "name", "photoUrls" ],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "doggie"
|
||||||
|
},
|
||||||
|
"category": { "$ref": "#/components/schemas/Category" },
|
||||||
|
"photoUrls": {
|
||||||
|
"type": "array",
|
||||||
|
"xml": { "wrapped": true },
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"xml": { "name": "photoUrl" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "array",
|
||||||
|
"xml": { "wrapped": true },
|
||||||
|
"items": { "$ref": "#/components/schemas/Tag" }
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "pet status in the store",
|
||||||
|
"enum": [ "available", "pending", "sold" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": { "name": "pet" }
|
||||||
|
},
|
||||||
|
"ApiResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"type": { "type": "string" },
|
||||||
|
"message": { "type": "string" }
|
||||||
|
},
|
||||||
|
"xml": { "name": "##default" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,59 +1,90 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.OpenApi.Readers;
|
using WireMock.RequestBuilders;
|
||||||
using Newtonsoft.Json;
|
using WireMock.ResponseBuilders;
|
||||||
|
|
||||||
namespace WireMock.Net.OpenApiParser.ConsoleApp
|
namespace WireMock.Net.OpenApiParser.ConsoleApp;
|
||||||
{
|
|
||||||
class Program
|
|
||||||
{
|
|
||||||
private const string Folder = "OpenApiFiles";
|
|
||||||
static void Main(string[] args)
|
|
||||||
{
|
|
||||||
//RunOthersOpenApiParserExample();
|
|
||||||
|
|
||||||
RunMockServerWithDynamicExampleGeneration();
|
class Program
|
||||||
}
|
{
|
||||||
|
private const string Folder = "OpenApiFiles";
|
||||||
private static void RunMockServerWithDynamicExampleGeneration() {
|
static void Main(string[] args)
|
||||||
//Run your mocking framework specifieing youur Example Values generator class.
|
{
|
||||||
var serverCustomer_V2_json = Run.RunServer(Path.Combine(Folder, "Swagger_Customer_V2.0.json"), "http://localhost:8090/", true, new DynamicDataGeneration(), Types.ExampleValueType.Value, Types.ExampleValueType.Value);
|
RunOthersOpenApiParserExample();
|
||||||
Console.WriteLine("Press any key to stop the servers");
|
|
||||||
|
|
||||||
Console.ReadKey();
|
|
||||||
serverCustomer_V2_json.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void RunOthersOpenApiParserExample()
|
|
||||||
{
|
|
||||||
var serverOpenAPIExamples = Run.RunServer(Path.Combine(Folder, "openAPIExamples.yaml"), "https://localhost:9091/");
|
|
||||||
var serverPetstore_V2_json = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V2.0.json"), "https://localhost:9092/");
|
|
||||||
var serverPetstore_V2_yaml = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V2.0.yaml"), "https://localhost:9093/");
|
|
||||||
var serverPetstore_V300_yaml = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V3.0.0.yaml"), "https://localhost:9094/");
|
|
||||||
var serverPetstore_V302_json = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V3.0.2.json"), "https://localhost:9095/");
|
|
||||||
|
|
||||||
Console.WriteLine("Press any key to stop the servers");
|
//RunMockServerWithDynamicExampleGeneration();
|
||||||
Console.ReadKey();
|
}
|
||||||
|
|
||||||
serverOpenAPIExamples.Stop();
|
private static void RunMockServerWithDynamicExampleGeneration()
|
||||||
serverPetstore_V2_json.Stop();
|
{
|
||||||
serverPetstore_V2_yaml.Stop();
|
//Run your mocking framework specifieing youur Example Values generator class.
|
||||||
serverPetstore_V300_yaml.Stop();
|
var serverCustomer_V2_json = Run.RunServer(Path.Combine(Folder, "Swagger_Customer_V2.0.json"), "http://localhost:8090/", true, new DynamicDataGeneration(), Types.ExampleValueType.Value, Types.ExampleValueType.Value);
|
||||||
serverPetstore_V302_json.Stop();
|
Console.WriteLine("Press any key to stop the servers");
|
||||||
|
|
||||||
//IWireMockOpenApiParser parser = new WireMockOpenApiParser();
|
Console.ReadKey();
|
||||||
|
serverCustomer_V2_json.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
//var petStoreModels = parser.FromStream(File.OpenRead("petstore-openapi3.json"), out OpenApiDiagnostic diagnostic1);
|
private static void RunOthersOpenApiParserExample()
|
||||||
//string petStoreJson = JsonConvert.SerializeObject(petStoreModels, Settings);
|
{
|
||||||
// File.WriteAllText("../../../wiremock-petstore-openapi3.json", petStoreJson);
|
var serverOpenAPIExamples = Run.RunServer(Path.Combine(Folder, "openAPIExamples.yaml"), "https://localhost:9091/");
|
||||||
|
var serverPetstore_V2_json = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V2.0.json"), "https://localhost:9092/");
|
||||||
|
var serverPetstore_V2_yaml = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V2.0.yaml"), "https://localhost:9093/");
|
||||||
|
var serverPetstore_V300_yaml = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V3.0.0.yaml"), "https://localhost:9094/");
|
||||||
|
var serverPetstore_V302_json = Run.RunServer(Path.Combine(Folder, "Swagger_Petstore_V3.0.2.json"), "https://localhost:9095/");
|
||||||
|
var testopenapifile_json = Run.RunServer(Path.Combine(Folder, "testopenapifile.json"), "https://localhost:9096/");
|
||||||
|
var file_errorYaml = Run.RunServer(Path.Combine(Folder, "file_error.yaml"), "https://localhost:9097/");
|
||||||
|
var file_petJson = Run.RunServer(Path.Combine(Folder, "pet.json"), "https://localhost:9098/");
|
||||||
|
var refsYaml = Run.RunServer(Path.Combine(Folder, "refs.yaml"), "https://localhost:9099/");
|
||||||
|
|
||||||
//Run.RunServer(petStoreModels);
|
testopenapifile_json
|
||||||
|
.Given(Request.Create().WithPath("/x").UsingGet())
|
||||||
|
.WithTitle("t")
|
||||||
|
.WithDescription("d")
|
||||||
|
.RespondWith(Response.Create()
|
||||||
|
.WithStatusCode(200)
|
||||||
|
.WithHeader("Content-Type", "application/json")
|
||||||
|
.WithBodyAsJson(new
|
||||||
|
{
|
||||||
|
result = "ok"
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
//var mappingModels2 = parser.FromStream(File.OpenRead("infura.yaml"), out OpenApiDiagnostic diagnostic2);
|
testopenapifile_json
|
||||||
//Console.WriteLine(JsonConvert.SerializeObject(diagnostic2, Settings));
|
.Given(Request.Create().WithPath("/y").UsingGet())
|
||||||
|
.WithTitle("t2")
|
||||||
|
.WithDescription("d2")
|
||||||
|
.RespondWith(Response.Create()
|
||||||
|
.WithStatusCode(200)
|
||||||
|
.WithHeader("Content-Type", "application/json")
|
||||||
|
.WithBodyAsJson(new[] { "string-value"})
|
||||||
|
);
|
||||||
|
|
||||||
//string json2 = JsonConvert.SerializeObject(mappingModels2, Settings);
|
Console.WriteLine("Press any key to stop the servers");
|
||||||
//Console.WriteLine(json2);
|
Console.ReadKey();
|
||||||
}
|
|
||||||
}
|
serverOpenAPIExamples.Stop();
|
||||||
|
serverPetstore_V2_json.Stop();
|
||||||
|
serverPetstore_V2_yaml.Stop();
|
||||||
|
serverPetstore_V300_yaml.Stop();
|
||||||
|
serverPetstore_V302_json.Stop();
|
||||||
|
testopenapifile_json.Stop();
|
||||||
|
file_errorYaml.Stop();
|
||||||
|
file_petJson.Stop();
|
||||||
|
refsYaml.Stop();
|
||||||
|
|
||||||
|
//IWireMockOpenApiParser parser = new WireMockOpenApiParser();
|
||||||
|
|
||||||
|
//var petStoreModels = parser.FromStream(File.OpenRead("petstore-openapi3.json"), out OpenApiDiagnostic diagnostic1);
|
||||||
|
//string petStoreJson = JsonConvert.SerializeObject(petStoreModels, Settings);
|
||||||
|
// File.WriteAllText("../../../wiremock-petstore-openapi3.json", petStoreJson);
|
||||||
|
|
||||||
|
//Run.RunServer(petStoreModels);
|
||||||
|
|
||||||
|
//var mappingModels2 = parser.FromStream(File.OpenRead("infura.yaml"), out OpenApiDiagnostic diagnostic2);
|
||||||
|
//Console.WriteLine(JsonConvert.SerializeObject(diagnostic2, Settings));
|
||||||
|
|
||||||
|
//string json2 = JsonConvert.SerializeObject(mappingModels2, Settings);
|
||||||
|
//Console.WriteLine(json2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,44 +1,29 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.OpenApiParser\WireMock.Net.OpenApiParser.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.OpenApiParser\WireMock.Net.OpenApiParser.csproj" />
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="infura.yaml">
|
<None Update="*.yaml">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="OpenApiFiles\openAPIExamples.yaml">
|
<None Update="*.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="OpenApiFiles\Swagger_Petstore_V2.0.json">
|
<None Update="OpenApiFiles\*.yaml">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="OpenApiFiles\Swagger_Petstore_V2.0.yaml">
|
<None Update="OpenApiFiles\*.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="OpenApiFiles\Swagger_Petstore_V3.0.0.yaml">
|
</ItemGroup>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="OpenApiFiles\Swagger_Petstore_V3.0.2.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="petstore-openapi3.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="petstore.yml">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="OpenApiFiles\Swagger_Customer_V2.0.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
@@ -44,8 +44,8 @@
|
|||||||
<Reference Include="Microsoft.Owin.Hosting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Hosting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
@@ -78,8 +78,8 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="XPath2, Version=1.1.0.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
<Reference Include="XPath2, Version=1.1.3.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\XPath2.1.1.0\lib\net40\XPath2.dll</HintPath>
|
<HintPath>..\..\packages\XPath2.1.1.3\lib\net452\XPath2.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net452" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
<package id="Microsoft.Owin" version="2.0.2" targetFramework="net452" />
|
<package id="Microsoft.Owin" version="2.0.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net452" />
|
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
||||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net452" />
|
<package id="System.Net.Http" version="4.3.4" targetFramework="net452" />
|
||||||
<package id="XPath2" version="1.1.0" targetFramework="net452" />
|
<package id="XPath2" version="1.1.3" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="log4net" Version="2.0.13" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -39,14 +39,14 @@
|
|||||||
<StartupObject>WireMock.Net.StandAlone.Net452.Program</StartupObject>
|
<StartupObject>WireMock.Net.StandAlone.Net452.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.0.0\lib\net451\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.0.0\lib\net451\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net452" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
<StartupObject>WireMock.Net.StandAlone.Net461.Program</StartupObject>
|
<StartupObject>WireMock.Net.StandAlone.Net461.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Handlebars, Version=1.9.5.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.1.9.5\lib\net452\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore, Version=2.1.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore, Version=2.1.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.2.1.4\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.2.1.4\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
||||||
@@ -198,14 +198,14 @@
|
|||||||
<Reference Include="MimeKitLite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
|
<Reference Include="MimeKitLite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\MimeKitLite.2.0.7\lib\net45\MimeKitLite.dll</HintPath>
|
<HintPath>..\..\packages\MimeKitLite.2.0.7\lib\net45\MimeKitLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestEase, Version=1.5.5.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RestEase, Version=1.5.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\RestEase.1.5.5\lib\net45\RestEase.dll</HintPath>
|
<HintPath>..\..\packages\RestEase.1.5.7\lib\net452\RestEase.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
@@ -225,8 +225,8 @@
|
|||||||
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IO.Pipelines.4.5.2\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
<HintPath>..\..\packages\System.IO.Pipelines.4.5.2\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.16.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.18.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.16\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.18\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||||
@@ -271,6 +271,9 @@
|
|||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.4\lib\net45\System.Web.Http.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.4\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
@@ -280,8 +283,8 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="XPath2, Version=1.1.0.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
<Reference Include="XPath2, Version=1.1.3.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\XPath2.1.1.0\lib\net40\XPath2.dll</HintPath>
|
<HintPath>..\..\packages\XPath2.1.1.3\lib\net452\XPath2.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Handlebars.Net" version="1.9.5" targetFramework="net461" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.4" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.4" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.4" targetFramework="net461" />
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<package id="Microsoft.AspNetCore.Hosting" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Hosting" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http" version="2.1.22" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http.Abstractions" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http.Extensions" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http.Extensions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http.Features" version="2.1.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http.Features" version="2.1.1" targetFramework="net461" />
|
||||||
@@ -57,15 +57,15 @@
|
|||||||
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net461" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.Owin.Hosting" version="4.0.0" targetFramework="net461" />
|
<package id="Microsoft.Owin.Hosting" version="4.0.0" targetFramework="net461" />
|
||||||
<package id="MimeKitLite" version="2.0.7" targetFramework="net461" />
|
<package id="MimeKitLite" version="2.0.7" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net461" />
|
<package id="Owin" version="1.0" targetFramework="net461" />
|
||||||
<package id="RestEase" version="1.5.5" targetFramework="net461" />
|
<package id="RestEase" version="1.5.7" targetFramework="net461" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
|
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.IO.Pipelines" version="4.5.2" targetFramework="net461" />
|
<package id="System.IO.Pipelines" version="4.5.2" targetFramework="net461" />
|
||||||
<package id="System.Linq.Dynamic.Core" version="1.2.16" targetFramework="net461" />
|
<package id="System.Linq.Dynamic.Core" version="1.2.18" targetFramework="net461" />
|
||||||
<package id="System.Memory" version="4.5.1" targetFramework="net461" />
|
<package id="System.Memory" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
||||||
@@ -78,5 +78,6 @@
|
|||||||
<package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
|
<package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Text.Encodings.Web" version="4.5.1" targetFramework="net461" />
|
<package id="System.Text.Encodings.Web" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="XPath2" version="1.1.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
|
<package id="XPath2" version="1.1.3" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
27
examples/WireMock.Net.WebApplication.NET6/App.cs
Normal file
27
examples/WireMock.Net.WebApplication.NET6/App.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WireMock.Net.WebApplication;
|
||||||
|
|
||||||
|
public class App : IHostedService
|
||||||
|
{
|
||||||
|
private readonly IWireMockService _service;
|
||||||
|
|
||||||
|
public App(IWireMockService service)
|
||||||
|
{
|
||||||
|
_service = service;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task StartAsync(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
_service.Start();
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
_service.Stop();
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace WireMock.Net.WebApplication;
|
||||||
|
|
||||||
|
public interface IWireMockService
|
||||||
|
{
|
||||||
|
void Start();
|
||||||
|
|
||||||
|
void Stop();
|
||||||
|
}
|
||||||
29
examples/WireMock.Net.WebApplication.NET6/Program.cs
Normal file
29
examples/WireMock.Net.WebApplication.NET6/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
|
namespace WireMock.Net.WebApplication;
|
||||||
|
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
CreateHostBuilder(args).Build().Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IHostBuilder CreateHostBuilder(string[] args)
|
||||||
|
=> Host.CreateDefaultBuilder(args)
|
||||||
|
.ConfigureServices((host, services) => ConfigureServices(services, host.Configuration));
|
||||||
|
|
||||||
|
private static void ConfigureServices(IServiceCollection services, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
services.AddLogging(logging => logging.AddConsole().AddDebug());
|
||||||
|
|
||||||
|
services.AddTransient<IWireMockService, WireMockService>();
|
||||||
|
services.Configure<WireMockServerSettings>(configuration.GetSection("WireMockServerSettings"));
|
||||||
|
|
||||||
|
services.AddHostedService<App>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"WireMock.Net.WebApplication.NET6": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:54544;http://localhost:54545"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
|
||||||
|
<StartupObject>WireMock.Net.WebApplication.Program</StartupObject>
|
||||||
|
<AssemblyName>WireMock.Net.WebApplication</AssemblyName>
|
||||||
|
<RootNamespace>WireMock.Net.WebApplication</RootNamespace>
|
||||||
|
<UserSecretsId>efcf4a18-fd7c-4622-1111-336d65290599</UserSecretsId>
|
||||||
|
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Remove="Properties\1.launchSettings.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
81
examples/WireMock.Net.WebApplication.NET6/WireMockService.cs
Normal file
81
examples/WireMock.Net.WebApplication.NET6/WireMockService.cs
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using WireMock.Admin.Requests;
|
||||||
|
using WireMock.Logging;
|
||||||
|
using WireMock.Server;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
|
namespace WireMock.Net.WebApplication;
|
||||||
|
|
||||||
|
public class WireMockService : IWireMockService
|
||||||
|
{
|
||||||
|
private WireMockServer? _server;
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly WireMockServerSettings _settings;
|
||||||
|
|
||||||
|
private class Logger : IWireMockLogger
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
|
public Logger(ILogger logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Debug(string formatString, params object[] args)
|
||||||
|
{
|
||||||
|
_logger.LogDebug(formatString, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Info(string formatString, params object[] args)
|
||||||
|
{
|
||||||
|
_logger.LogInformation(formatString, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Warn(string formatString, params object[] args)
|
||||||
|
{
|
||||||
|
_logger.LogWarning(formatString, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Error(string formatString, params object[] args)
|
||||||
|
{
|
||||||
|
_logger.LogError(formatString, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminrequest)
|
||||||
|
{
|
||||||
|
string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);
|
||||||
|
_logger.LogDebug("Admin[{0}] {1}", isAdminrequest, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Error(string formatString, Exception exception)
|
||||||
|
{
|
||||||
|
_logger.LogError(formatString, exception.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public WireMockService(ILogger<WireMockService> logger, IOptions<WireMockServerSettings> settings)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
_settings = settings.Value;
|
||||||
|
|
||||||
|
_settings.Logger = new Logger(logger);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
_logger.LogInformation("WireMock.Net server starting");
|
||||||
|
|
||||||
|
_server = WireMockServer.Start(_settings);
|
||||||
|
|
||||||
|
_logger.LogInformation($"WireMock.Net server settings {JsonConvert.SerializeObject(_settings)}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
_logger.LogInformation("WireMock.Net server stopping");
|
||||||
|
_server?.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
{
|
||||||
|
"Guid": "1e0686d3-5eb0-4c30-9482-db3735a1e4c4",
|
||||||
|
"Title": "",
|
||||||
|
"Request": {
|
||||||
|
"Path": {
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "/favicon.ico",
|
||||||
|
"IgnoreCase": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Methods": [
|
||||||
|
"GET"
|
||||||
|
],
|
||||||
|
"Headers": [
|
||||||
|
{
|
||||||
|
"Name": "Accept",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Host",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "localhost:8081",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "User-Agent",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": ":method",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "GET",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Accept-Encoding",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "gzip, deflate, br",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Accept-Language",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "en-US,en;q=0.9,nl;q=0.8",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Referer",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "https://localhost:8081/__admin/mappings",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "sec-ch-ua",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"99\", \"Google Chrome\";v=\"99\"",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "sec-ch-ua-mobile",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "?0",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "sec-ch-ua-platform",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "\"Windows\"",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "sec-fetch-site",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "same-origin",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "sec-fetch-mode",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "no-cors",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "sec-fetch-dest",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "image",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Cookies": [
|
||||||
|
{
|
||||||
|
"Name": "ai_user",
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "4z4B71qxV7rOSA6Gf3IFZ1|2021-07-20T17:07:54.344Z",
|
||||||
|
"IgnoreCase": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"StatusCode": 200,
|
||||||
|
"Body": "<!doctype html><html lang=\"en\"><head><script>!function(e,t,a,n,g){e[n]=e[n]||[],e[n].push({\"gtm.start\":(new Date).getTime(),event:\"gtm.js\"});var m=t.getElementsByTagName(a)[0],r=t.createElement(a);r.async=!0,r.src=\"https://www.googletagmanager.com/gtm.js?id=GTM-NTGJQ9S\",m.parentNode.insertBefore(r,m)}(window,document,\"script\",\"dataLayer\")</script><meta charset=\"utf-8\"/><link rel=\"icon\" type=\"image/png\" href=\"/favicon.png\"/><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"/><title>Product Support Portal | SmartBear Software</title><link href=\"https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700|Roboto+Mono:400,400i\" rel=\"stylesheet\"><link rel=\"stylesheet\" href=\"https://pro.fontawesome.com/releases/v5.13.1/css/all.css\" integrity=\"sha384-B9BoFFAuBaCfqw6lxWBZrhg/z4NkwqdBci+E+Sc2XlK/Rz25RYn8Fetb+Aw5irxa\" crossorigin=\"anonymous\"><script src=\"https://code.jquery.com/jquery-3.3.1.min.js\" integrity=\"sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=\" crossorigin=\"anonymous\"></script><script src=\"https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js\" type=\"text/javascript\"></script><link href=\"/static/css/main.f0fcb0c0.chunk.css\" rel=\"stylesheet\"></head><body><noscript><iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-NTGJQ9S\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript><noscript>You need to enable JavaScript to run this website.</noscript><div id=\"root\"></div><script>!function(e){function r(r){for(var n,p,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)p=l[c],Object.prototype.hasOwnProperty.call(o,p)&&o[p]&&s.push(o[p][0]),o[p]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(i&&i(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=p(p.s=t[0]))}return e}var n={},o={1:0},u=[];function p(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,p),t.l=!0,t.exports}p.m=e,p.c=n,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},p.t=function(e,r){if(1&r&&(e=p(e)),8&r)return e;if(4&r&&\"object\"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,\"default\",{enumerable:!0,value:e}),2&r&&\"string\"!=typeof e)for(var n in e)p.d(t,n,function(r){return e[r]}.bind(null,n));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,\"a\",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p=\"/\";var l=this[\"webpackJsonpweb-support-react\"]=this[\"webpackJsonpweb-support-react\"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var i=a;t()}([])</script><script src=\"/static/js/2.cfa1a356.chunk.js\"></script><script src=\"/static/js/main.cb89e4ed.chunk.js\"></script></body></html>",
|
||||||
|
"Headers": {
|
||||||
|
"Content-Type": "text/html",
|
||||||
|
"Last-Modified": "Thu, 10 Mar 2022 08:39:07 GMT",
|
||||||
|
"Transfer-Encoding": "chunked",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Date": "Fri, 11 Mar 2022 09:21:22 GMT",
|
||||||
|
"ETag": "W/\"cd426e4e5a34d81:0\"",
|
||||||
|
"X-XSS-Protection": "1; mode=block",
|
||||||
|
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
|
||||||
|
"X-Frame-Options": "SAMEORIGIN",
|
||||||
|
"X-Content-Type-Options": "nosniff",
|
||||||
|
"Content-Security-Policy": "frame-ancestors 'self'",
|
||||||
|
"Vary": "Accept-Encoding",
|
||||||
|
"X-Cache": "Miss from cloudfront",
|
||||||
|
"Via": "1.1 e328b143eb69c36369a2def78300d502.cloudfront.net (CloudFront)",
|
||||||
|
"X-Amz-Cf-Pop": "AMS1-C1",
|
||||||
|
"X-Amz-Cf-Id": "fUBp1b6g0N3JnLuj_VcueuCf0Rw-eXfBNKHq7luNlAOtqAxU5MUdcA=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
29
examples/WireMock.Net.WebApplication.NET6/appsettings.json
Normal file
29
examples/WireMock.Net.WebApplication.NET6/appsettings.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": false,
|
||||||
|
"Debug": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Console": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WireMockServerSettings": {
|
||||||
|
"StartAdminInterface": true,
|
||||||
|
"Urls": [
|
||||||
|
"https://localhost:8081/"
|
||||||
|
],
|
||||||
|
"AllowPartialMapping": false,
|
||||||
|
"HandleRequestsSynchronously": true,
|
||||||
|
"ThrowExceptionWhenMatcherFails": true,
|
||||||
|
"ProxyAndRecordSettings": {
|
||||||
|
"Url": "http://postman-echo.com/post",
|
||||||
|
"SaveMapping": true,
|
||||||
|
"SaveMappingToFile": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
examples/WireMock.Net.WebApplication.NET6/readme.md
Normal file
21
examples/WireMock.Net.WebApplication.NET6/readme.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Running in IIS
|
||||||
|
|
||||||
|
Follow these links / steps:
|
||||||
|
* https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
|
||||||
|
* https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-2.1
|
||||||
|
* Create a `web.config` file
|
||||||
|
|
||||||
|
## IIS Sites
|
||||||
|

|
||||||
|
|
||||||
|
## App Pool settings
|
||||||
|

|
||||||
|
|
||||||
|
## Publish Profiles
|
||||||
|
Two example publish profiles are created:
|
||||||
|
* [IIS Localhost 1](./Properties/PublishProfiles/IIS%20Localhost%201.pubxml)
|
||||||
|
* [IIS Localhost 2](./Properties/PublishProfiles/IIS%20Localhost%202.pubxml)
|
||||||
|
|
||||||
|
## Debugging
|
||||||
|
Select the debug "IIS" if you want to debug in IIS.
|
||||||
|

|
||||||
12
examples/WireMock.Net.WebApplication.NET6/web.config
Normal file
12
examples/WireMock.Net.WebApplication.NET6/web.config
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<!--
|
||||||
|
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
|
||||||
|
-->
|
||||||
|
<system.webServer>
|
||||||
|
<handlers>
|
||||||
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||||
|
</handlers>
|
||||||
|
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
@@ -2,13 +2,9 @@
|
|||||||
"iisSettings": {
|
"iisSettings": {
|
||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
"iis": {
|
|
||||||
"applicationUrl": "http://localhost//wiremock",
|
|
||||||
"sslPort": 0
|
|
||||||
},
|
|
||||||
"iisExpress": {
|
"iisExpress": {
|
||||||
"applicationUrl": "http://localhost:56513/",
|
"applicationUrl": "http://localhost:60097/",
|
||||||
"sslPort": 0
|
"sslPort": 44321
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profiles": {
|
"profiles": {
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0'">
|
||||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
|
||||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" />
|
<PackageReference Include="Microsoft.AspNetCore.All" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
|
<!--<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>-->
|
||||||
<StartupObject>WireMock.Net.WebApplication.Program</StartupObject>
|
<StartupObject>WireMock.Net.WebApplication.Program</StartupObject>
|
||||||
<AssemblyName>WireMock.Net.WebApplication</AssemblyName>
|
<AssemblyName>WireMock.Net.WebApplication</AssemblyName>
|
||||||
<RootNamespace>WireMock.Net.WebApplication</RootNamespace>
|
<RootNamespace>WireMock.Net.WebApplication</RootNamespace>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.8" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.8" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,19 +1,27 @@
|
|||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Body Model
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class BodyModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Body Model
|
/// Gets or sets the matcher.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public MatcherModel? Matcher { get; set; }
|
||||||
public class BodyModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the matcher.
|
|
||||||
/// </summary>
|
|
||||||
public MatcherModel Matcher { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the matchers.
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MatcherModel[] Matchers { get; set; }
|
public MatcherModel[]? Matchers { get; set; }
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Operator to use when matchers are defined. [Optional]
|
||||||
|
/// - null = Same as "or".
|
||||||
|
/// - "or" = Only one pattern should match.
|
||||||
|
/// - "and" = All patterns should match.
|
||||||
|
/// - "average" = The average value from all patterns.
|
||||||
|
/// </summary>
|
||||||
|
public string? MatchOperator { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ClientIPModel
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class ClientIPModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ClientIPModel
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public MatcherModel[]? Matchers { get; set; }
|
||||||
public class ClientIPModel
|
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// The Operator to use when matchers are defined. [Optional]
|
||||||
/// Gets or sets the matchers.
|
/// - null = Same as "or".
|
||||||
/// </summary>
|
/// - "or" = Only one pattern should match.
|
||||||
public MatcherModel[] Matchers { get; set; }
|
/// - "and" = All patterns should match.
|
||||||
}
|
/// - "average" = The average value from all patterns.
|
||||||
|
/// </summary>
|
||||||
|
public string? MatchOperator { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings
|
||||||
{
|
{
|
||||||
@@ -11,12 +11,12 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name.
|
/// Gets or sets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the matchers.
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<MatcherModel> Matchers { get; set; }
|
public IList<MatcherModel>? Matchers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the ignore case.
|
/// Gets or sets the ignore case.
|
||||||
|
|||||||
@@ -1,31 +1,39 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Header Model
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class HeaderModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Header Model
|
/// Gets or sets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public string Name { get; set; } = null!;
|
||||||
public class HeaderModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name.
|
|
||||||
/// </summary>
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the matchers.
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<MatcherModel> Matchers { get; set; }
|
public IList<MatcherModel>? Matchers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the ignore case.
|
/// Gets or sets the ignore case.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IgnoreCase { get; set; }
|
public bool? IgnoreCase { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reject on match.
|
/// Reject on match.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? RejectOnMatch { get; set; }
|
public bool? RejectOnMatch { get; set; }
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Operator to use when matchers are defined. [Optional]
|
||||||
|
/// - null = Same as "or".
|
||||||
|
/// - "or" = Only one pattern should match.
|
||||||
|
/// - "and" = All patterns should match.
|
||||||
|
/// - "average" = The average value from all patterns.
|
||||||
|
/// </summary>
|
||||||
|
public string? MatchOperator { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,73 +1,77 @@
|
|||||||
using System;
|
using System;
|
||||||
using WireMock.Models;
|
using WireMock.Models;
|
||||||
|
|
||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MappingModel
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class MappingModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MappingModel
|
/// Gets or sets the unique identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public Guid? Guid { get; set; }
|
||||||
public class MappingModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the unique identifier.
|
|
||||||
/// </summary>
|
|
||||||
public Guid? Guid { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the TimeSettings when which this mapping should be used.
|
/// Gets or sets the TimeSettings when which this mapping should be used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TimeSettingsModel TimeSettings { get; set; }
|
public TimeSettingsModel? TimeSettings { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The unique title.
|
/// The unique title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Title { get; set; }
|
public string? Title { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The priority.
|
/// The description.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Priority { get; set; }
|
public string? Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Scenario.
|
/// The priority. (A low value means higher priority.)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Scenario { get; set; }
|
public int? Priority { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execution state condition for the current mapping.
|
/// The Scenario.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string WhenStateIs { get; set; }
|
public string? Scenario { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The next state which will be signaled after the current mapping execution.
|
/// Execution state condition for the current mapping.
|
||||||
/// In case the value is null state will not be changed.
|
/// </summary>
|
||||||
/// </summary>
|
public string? WhenStateIs { get; set; }
|
||||||
public string SetStateTo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The request model.
|
/// The next state which will be signaled after the current mapping execution.
|
||||||
/// </summary>
|
/// In case the value is null state will not be changed.
|
||||||
public RequestModel Request { get; set; }
|
/// </summary>
|
||||||
|
public string? SetStateTo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The response model.
|
/// The request model.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ResponseModel Response { get; set; }
|
public RequestModel Request { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves this mapping as a static mapping file.
|
/// The response model.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? SaveToFile { get; set; }
|
public ResponseModel Response { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Webhook.
|
/// Saves this mapping as a static mapping file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WebhookModel Webhook { get; set; }
|
public bool? SaveToFile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Webhooks.
|
/// The Webhook.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WebhookModel[] Webhooks { get; set; }
|
public WebhookModel? Webhook { get; set; }
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Webhooks.
|
||||||
|
/// </summary>
|
||||||
|
public WebhookModel[]? Webhooks { get; set; }
|
||||||
}
|
}
|
||||||
@@ -14,17 +14,17 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the pattern. Can be a string (default) or an object.
|
/// Gets or sets the pattern. Can be a string (default) or an object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object Pattern { get; set; }
|
public object? Pattern { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the patterns. Can be array of strings (default) or an array of objects.
|
/// Gets or sets the patterns. Can be array of strings (default) or an array of objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object[] Patterns { get; set; }
|
public object[]? Patterns { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the pattern as a file.
|
/// Gets or sets the pattern as a file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PatternAsFile { get; set; }
|
public string? PatternAsFile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the ignore case.
|
/// Gets or sets the ignore case.
|
||||||
@@ -35,5 +35,14 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// Reject on match.
|
/// Reject on match.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? RejectOnMatch { get; set; }
|
public bool? RejectOnMatch { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Operator to use when multiple patterns are defined. Optional.
|
||||||
|
/// - null = Same as "or".
|
||||||
|
/// - "or" = Only one pattern should match.
|
||||||
|
/// - "and" = All patterns should match.
|
||||||
|
/// - "average" = The average value from all patterns.
|
||||||
|
/// </summary>
|
||||||
|
public string? MatchOperator { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,23 @@
|
|||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Param Model
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class ParamModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Param Model
|
/// Gets or sets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public string Name { get; set; } = null!;
|
||||||
public class ParamModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name.
|
|
||||||
/// </summary>
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines if the key should be matched using case-ignore.
|
/// Defines if the key should be matched using case-ignore.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IgnoreCase { get; set; }
|
public bool? IgnoreCase { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the matchers.
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MatcherModel[] Matchers { get; set; }
|
public MatcherModel[]? Matchers { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PathModel
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class PathModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PathModel
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public MatcherModel[]? Matchers { get; set; }
|
||||||
public class PathModel
|
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// The Operator to use when matchers are defined. [Optional]
|
||||||
/// Gets or sets the matchers.
|
/// - null = Same as "or".
|
||||||
/// </summary>
|
/// - "or" = Only one pattern should match.
|
||||||
public MatcherModel[] Matchers { get; set; }
|
/// - "and" = All patterns should match.
|
||||||
}
|
/// - "average" = The average value from all patterns.
|
||||||
|
/// </summary>
|
||||||
|
public string? MatchOperator { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,51 +1,64 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RequestModel
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class RequestModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RequestModel
|
/// Gets or sets the ClientIP. (Can be a string or a ClientIPModel)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public object? ClientIP { get; set; }
|
||||||
public class RequestModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the ClientIP. (Can be a string or a ClientIPModel)
|
|
||||||
/// </summary>
|
|
||||||
public object ClientIP { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Path. (Can be a string or a PathModel)
|
/// Gets or sets the Path. (Can be a string or a PathModel)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object Path { get; set; }
|
public object? Path { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Url. (Can be a string or a UrlModel)
|
/// Gets or sets the Url. (Can be a string or a UrlModel)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object Url { get; set; }
|
public object? Url { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The methods
|
/// The methods
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string[] Methods { get; set; }
|
public string[]? Methods { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Headers.
|
/// Reject on match for Methods.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<HeaderModel> Headers { get; set; }
|
public bool? MethodsRejectOnMatch { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Cookies.
|
/// The Operator to use when Methods are defined. [Optional]
|
||||||
/// </summary>
|
/// - null = Same as "or".
|
||||||
public IList<CookieModel> Cookies { get; set; }
|
/// - "or" = Only one method should match.
|
||||||
|
/// - "and" = All methods should match.
|
||||||
|
/// - "average" = The average value from all methods.
|
||||||
|
/// </summary>
|
||||||
|
public string? MethodsMatchOperator { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Params.
|
/// Gets or sets the Headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<ParamModel> Params { get; set; }
|
public IList<HeaderModel>? Headers { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Cookies.
|
||||||
|
/// </summary>
|
||||||
|
public IList<CookieModel>? Cookies { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Params.
|
||||||
|
/// </summary>
|
||||||
|
public IList<ParamModel>? Params { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body.
|
/// Gets or sets the body.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BodyModel Body { get; set; }
|
public BodyModel? Body { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -11,22 +11,22 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the HTTP status.
|
/// Gets or sets the HTTP status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object StatusCode { get; set; }
|
public object? StatusCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body destination (SameAsSource, String or Bytes).
|
/// Gets or sets the body destination (SameAsSource, String or Bytes).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BodyDestination { get; set; }
|
public string? BodyDestination { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body.
|
/// Gets or sets the body.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Body { get; set; }
|
public string? Body { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body (as JSON object).
|
/// Gets or sets the body (as JSON object).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object BodyAsJson { get; set; }
|
public object? BodyAsJson { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether child objects to be indented according to the Newtonsoft.Json.JsonTextWriter.Indentation and Newtonsoft.Json.JsonTextWriter.IndentChar settings.
|
/// Gets or sets a value indicating whether child objects to be indented according to the Newtonsoft.Json.JsonTextWriter.Indentation and Newtonsoft.Json.JsonTextWriter.IndentChar settings.
|
||||||
@@ -36,12 +36,12 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body (as bytearray).
|
/// Gets or sets the body (as bytearray).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte[] BodyAsBytes { get; set; }
|
public byte[]? BodyAsBytes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body as a file.
|
/// Gets or sets the body as a file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BodyAsFile { get; set; }
|
public string? BodyAsFile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is the body as file cached?
|
/// Is the body as file cached?
|
||||||
@@ -51,7 +51,7 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body encoding.
|
/// Gets or sets the body encoding.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EncodingModel BodyEncoding { get; set; }
|
public EncodingModel? BodyEncoding { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use ResponseMessage Transformer.
|
/// Use ResponseMessage Transformer.
|
||||||
@@ -61,7 +61,7 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the transformer.
|
/// Gets the type of the transformer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TransformerType { get; set; }
|
public string? TransformerType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use the Handlebars transformer for the content from the referenced BodyAsFile.
|
/// Use the Handlebars transformer for the content from the referenced BodyAsFile.
|
||||||
@@ -71,17 +71,17 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ReplaceNodeOptions to use when transforming a JSON node.
|
/// The ReplaceNodeOptions to use when transforming a JSON node.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TransformerReplaceNodeOptions { get; set; }
|
public string? TransformerReplaceNodeOptions { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the headers.
|
/// Gets or sets the headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IDictionary<string, object> Headers { get; set; }
|
public IDictionary<string, object>? Headers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Headers (Raw).
|
/// Gets or sets the Headers (Raw).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HeadersRaw { get; set; }
|
public string? HeadersRaw { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the delay in milliseconds.
|
/// Gets or sets the delay in milliseconds.
|
||||||
@@ -101,21 +101,21 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Proxy URL.
|
/// Gets or sets the Proxy URL.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ProxyUrl { get; set; }
|
public string? ProxyUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The client X509Certificate2 Thumbprint or SubjectName to use.
|
/// The client X509Certificate2 Thumbprint or SubjectName to use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string X509Certificate2ThumbprintOrSubjectName { get; set; }
|
public string? X509Certificate2ThumbprintOrSubjectName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the fault.
|
/// Gets or sets the fault.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public FaultModel Fault { get; set; }
|
public FaultModel? Fault { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the WebProxy settings.
|
/// Gets or sets the WebProxy settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WebProxyModel WebProxy { get; set; }
|
public WebProxyModel? WebProxy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
namespace WireMock.Admin.Mappings
|
namespace WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UrlModel
|
||||||
|
/// </summary>
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class UrlModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UrlModel
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public MatcherModel[]? Matchers { get; set; }
|
||||||
public class UrlModel
|
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// The Operator to use when matchers are defined. [Optional]
|
||||||
/// Gets or sets the matchers.
|
/// - null = Same as "or".
|
||||||
/// </summary>
|
/// - "or" = Only one pattern should match.
|
||||||
public MatcherModel[] Matchers { get; set; }
|
/// - "and" = All patterns should match.
|
||||||
}
|
/// - "average" = The average value from all patterns.
|
||||||
}
|
/// </summary>
|
||||||
|
public string? MatchOperator { get; set; }
|
||||||
|
}
|
||||||
@@ -1,56 +1,54 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace WireMock.Admin.Requests
|
namespace WireMock.Admin.Requests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Request Log Model
|
||||||
|
/// </summary>
|
||||||
|
public class LogEntryModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request Log Model
|
/// The unique identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public Guid Guid { get; set; }
|
||||||
public class LogEntryModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The unique identifier.
|
|
||||||
/// </summary>
|
|
||||||
public Guid Guid { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The request.
|
/// The request.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LogRequestModel Request { get; set; }
|
public LogRequestModel Request { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The response.
|
/// The response.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LogResponseModel Response { get; set; }
|
public LogResponseModel Response { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mapping unique identifier.
|
/// The mapping unique identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? MappingGuid { get; set; }
|
public Guid? MappingGuid { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mapping unique title.
|
/// The mapping unique title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MappingTitle { get; set; }
|
public string MappingTitle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The request match result.
|
/// The request match result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LogRequestMatchModel RequestMatchResult { get; set; }
|
public LogRequestMatchModel RequestMatchResult { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The partial mapping unique identifier.
|
/// The partial mapping unique identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? PartialMappingGuid { get; set; }
|
public Guid? PartialMappingGuid { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The partial mapping unique title.
|
/// The partial mapping unique title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PartialMappingTitle { get; set; }
|
public string PartialMappingTitle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The partial request match result.
|
/// The partial request match result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LogRequestMatchModel PartialRequestMatchResult { get; set; }
|
public LogRequestMatchModel PartialRequestMatchResult { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,51 +1,49 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WireMock.Admin.Requests
|
namespace WireMock.Admin.Requests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LogRequestMatchModel
|
||||||
|
/// </summary>
|
||||||
|
public class LogRequestMatchModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// LogRequestMatchModel
|
/// Gets or sets the match-score.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
/// <value>
|
||||||
public class LogRequestMatchModel
|
/// The match-score.
|
||||||
{
|
/// </value>
|
||||||
/// <summary>
|
public double TotalScore { get; set; }
|
||||||
/// Gets or sets the match-score.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>
|
|
||||||
/// The match-score.
|
|
||||||
/// </value>
|
|
||||||
public double TotalScore { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the total number of matches.
|
/// Gets or sets the total number of matches.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The total number of matches.
|
/// The total number of matches.
|
||||||
/// </value>
|
/// </value>
|
||||||
public int TotalNumber { get; set; }
|
public int TotalNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is perfect match.
|
/// Gets or sets a value indicating whether this instance is perfect match.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// <c>true</c> if this instance is perfect match; otherwise, <c>false</c>.
|
/// <c>true</c> if this instance is perfect match; otherwise, <c>false</c>.
|
||||||
/// </value>
|
/// </value>
|
||||||
public bool IsPerfectMatch { get; set; }
|
public bool IsPerfectMatch { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the match percentage.
|
/// Gets the match percentage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The match percentage.
|
/// The match percentage.
|
||||||
/// </value>
|
/// </value>
|
||||||
public double AverageTotalScore { get; set; }
|
public double AverageTotalScore { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the match details.
|
/// Gets the match details.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The match details.
|
/// The match details.
|
||||||
/// </value>
|
/// </value>
|
||||||
public IList<object> MatchDetails { get; set; }
|
public IList<object> MatchDetails { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,109 +1,107 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
|
|
||||||
namespace WireMock.Admin.Requests
|
namespace WireMock.Admin.Requests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RequestMessage Model
|
||||||
|
/// </summary>
|
||||||
|
public class LogRequestModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RequestMessage Model
|
/// The Client IP Address.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public string ClientIP { get; set; }
|
||||||
public class LogRequestModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The Client IP Address.
|
|
||||||
/// </summary>
|
|
||||||
public string ClientIP { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The DateTime.
|
/// The DateTime.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime DateTime { get; set; }
|
public DateTime DateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Path.
|
/// The Path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Absolute Path.
|
/// The Absolute Path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AbsolutePath { get; set; }
|
public string AbsolutePath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the url (relative).
|
/// Gets the url (relative).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The absolute URL.
|
/// The absolute URL.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AbsoluteUrl { get; set; }
|
public string AbsoluteUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ProxyUrl (if a proxy is used).
|
/// The ProxyUrl (if a proxy is used).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ProxyUrl { get; set; }
|
public string? ProxyUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The query.
|
/// The query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IDictionary<string, WireMockList<string>> Query { get; set; }
|
public IDictionary<string, WireMockList<string>>? Query { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The method.
|
/// The method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Method { get; set; }
|
public string Method { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Headers.
|
/// The Headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IDictionary<string, WireMockList<string>> Headers { get; set; }
|
public IDictionary<string, WireMockList<string>>? Headers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Cookies.
|
/// The Cookies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IDictionary<string, string> Cookies { get; set; }
|
public IDictionary<string, string>? Cookies { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as string).
|
/// The body (as string).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Body { get; set; }
|
public string? Body { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as JSON object).
|
/// The body (as JSON object).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object BodyAsJson { get; set; }
|
public object? BodyAsJson { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as bytearray).
|
/// The body (as bytearray).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte[] BodyAsBytes { get; set; }
|
public byte[]? BodyAsBytes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body encoding.
|
/// The body encoding.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EncodingModel BodyEncoding { get; set; }
|
public EncodingModel? BodyEncoding { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The DetectedBodyType, valid values are:
|
/// The DetectedBodyType, valid values are:
|
||||||
///
|
///
|
||||||
/// - None
|
/// - None
|
||||||
/// - String
|
/// - String
|
||||||
/// - Json
|
/// - Json
|
||||||
/// - Bytes
|
/// - Bytes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DetectedBodyType { get; set; }
|
public string? DetectedBodyType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The DetectedBodyTypeFromContentType, valid values are:
|
/// The DetectedBodyTypeFromContentType, valid values are:
|
||||||
///
|
///
|
||||||
/// - None
|
/// - None
|
||||||
/// - String
|
/// - String
|
||||||
/// - Json
|
/// - Json
|
||||||
/// - Bytes
|
/// - Bytes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DetectedBodyTypeFromContentType { get; set; }
|
public string? DetectedBodyTypeFromContentType { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,83 +1,81 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
|
|
||||||
namespace WireMock.Admin.Requests
|
namespace WireMock.Admin.Requests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Response MessageModel
|
||||||
|
/// </summary>
|
||||||
|
public class LogResponseModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Response MessageModel
|
/// Gets or sets the status code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[FluentBuilder.AutoGenerateBuilder]
|
public object? StatusCode { get; set; }
|
||||||
public class LogResponseModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the status code.
|
|
||||||
/// </summary>
|
|
||||||
public object StatusCode { get; set; } = 200;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the headers.
|
/// Gets the headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IDictionary<string, WireMockList<string>> Headers { get; set; }
|
public IDictionary<string, WireMockList<string>>? Headers { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body destination (SameAsSource, String or Bytes).
|
/// Gets or sets the body destination (SameAsSource, String or Bytes).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BodyDestination { get; set; }
|
public string? BodyDestination { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as string).
|
/// The body (as string).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Body { get; set; }
|
public string? Body { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as JSON object).
|
/// The body (as JSON object).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object BodyAsJson { get; set; }
|
public object? BodyAsJson { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as bytearray).
|
/// The body (as bytearray).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte[] BodyAsBytes { get; set; }
|
public byte[]? BodyAsBytes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body as file.
|
/// Gets or sets the body as file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BodyAsFile { get; set; }
|
public string? BodyAsFile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is the body as file cached?
|
/// Is the body as file cached?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? BodyAsFileIsCached { get; set; }
|
public bool? BodyAsFileIsCached { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the original body.
|
/// Gets or sets the original body.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BodyOriginal { get; set; }
|
public string? BodyOriginal { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body.
|
/// Gets or sets the body.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EncodingModel BodyEncoding { get; set; }
|
public EncodingModel? BodyEncoding { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected body type (detection based on body content).
|
/// The detected body type (detection based on body content).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BodyType DetectedBodyType { get; set; }
|
public BodyType? DetectedBodyType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected body type (detection based on Content-Type).
|
/// The detected body type (detection based on Content-Type).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BodyType DetectedBodyTypeFromContentType { get; set; }
|
public BodyType? DetectedBodyTypeFromContentType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The FaultType.
|
/// The FaultType.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FaultType { get; set; }
|
public string? FaultType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Fault percentage.
|
/// Gets or sets the Fault percentage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double? FaultPercentage { get; set; }
|
public double? FaultPercentage { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace WireMock.Admin.Scenarios
|
namespace WireMock.Admin.Scenarios
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ScenarioStateModel
|
/// ScenarioStateModel
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the NextState.
|
/// Gets or sets the NextState.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string NextState { get; set; }
|
public string? NextState { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this <see cref="ScenarioStateModel"/> is started.
|
/// Gets or sets a value indicating whether this <see cref="ScenarioStateModel"/> is started.
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
namespace WireMock.Admin.Settings
|
||||||
|
{
|
||||||
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class ProxyAndRecordSettingsModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The clientCertificate thumbprint or subject name fragment to use.
|
||||||
|
/// Example thumbprint : "D2DBF135A8D06ACCD0E1FAD9BFB28678DF7A9818". Example subject name: "www.google.com""
|
||||||
|
/// </summary>
|
||||||
|
public string ClientX509Certificate2ThumbprintOrSubjectName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the WebProxySettings.
|
||||||
|
/// </summary>
|
||||||
|
public WebProxySettingsModel WebProxySettings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Proxy requests should follow redirection (30x).
|
||||||
|
/// </summary>
|
||||||
|
public bool? AllowAutoRedirect { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL to proxy.
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Save the mapping for each request/response to the internal Mappings.
|
||||||
|
/// </summary>
|
||||||
|
public bool SaveMapping { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Save the mapping for each request/response also to a file. (Note that SaveMapping must also be set to true.)
|
||||||
|
/// </summary>
|
||||||
|
public bool SaveMappingToFile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Only save request/response to the internal Mappings if the status code is included in this pattern. (Note that SaveMapping must also be set to true.)
|
||||||
|
/// The pattern can contain a single value like "200", but also ranges like "2xx", "100,300,600" or "100-299,6xx" are supported.
|
||||||
|
/// </summary>
|
||||||
|
public string SaveMappingForStatusCodePattern { get; set; } = "*";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines a list from headers which will be excluded from the saved mappings.
|
||||||
|
/// </summary>
|
||||||
|
public string[] ExcludedHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines a list of cookies which will be excluded from the saved mappings.
|
||||||
|
/// </summary>
|
||||||
|
public string[] ExcludedCookies { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prefer the Proxy Mapping over the saved Mapping (in case SaveMapping is set to <c>true</c>).
|
||||||
|
/// </summary>
|
||||||
|
// public bool PreferProxyMapping { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
using WireMock.Types;
|
|
||||||
|
|
||||||
namespace WireMock.Admin.Settings
|
namespace WireMock.Admin.Settings
|
||||||
{
|
{
|
||||||
@@ -55,9 +54,29 @@ namespace WireMock.Admin.Settings
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? SaveUnmatchedRequests { get; set; }
|
public bool? SaveUnmatchedRequests { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets if the static mappings should be read at startup.
|
||||||
|
/// </summary>
|
||||||
|
public bool? ReadStaticMappings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Watch the static mapping files + folder for changes when running.
|
||||||
|
/// </summary>
|
||||||
|
public bool? WatchStaticMappings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A value indicating whether subdirectories within the static mappings path should be monitored.
|
||||||
|
/// </summary>
|
||||||
|
public bool? WatchStaticMappingsInSubdirectories { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Policies to use when using CORS. By default CORS is disabled. [Optional]
|
/// Policies to use when using CORS. By default CORS is disabled. [Optional]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CorsPolicyOptions { get; set; }
|
public string? CorsPolicyOptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The proxy and record settings.
|
||||||
|
/// </summary>
|
||||||
|
public ProxyAndRecordSettingsModel? ProxyAndRecordSettings { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,24 @@
|
|||||||
namespace WireMock.Settings
|
namespace WireMock.Admin.Settings
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IWebProxySettings
|
/// WebProxySettings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IWebProxySettings
|
[FluentBuilder.AutoGenerateBuilder]
|
||||||
|
public class WebProxySettingsModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A string instance that contains the address of the proxy server.
|
/// A string instance that contains the address of the proxy server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The user name associated with the credentials.
|
/// The user name associated with the credentials.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string UserName { get; set; }
|
public string? UserName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The password for the user name associated with the credentials.
|
/// The password for the user name associated with the credentials.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Password { get; set; }
|
public string? Password { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
namespace WireMock.Extensions;
|
||||||
|
|
||||||
|
public static class RequestModelExtensions
|
||||||
|
{
|
||||||
|
public static string? GetPathAsString(this RequestModel request)
|
||||||
|
{
|
||||||
|
var path = request.Path switch
|
||||||
|
{
|
||||||
|
string pathAsString => pathAsString,
|
||||||
|
PathModel pathModel => pathModel.Matchers?.FirstOrDefault()?.Pattern as string,
|
||||||
|
_ => null
|
||||||
|
};
|
||||||
|
|
||||||
|
return FixPath(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string? FixPath(string? path)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
{
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return path!.StartsWith("/") ? path : $"/{path}";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using WireMock.Admin.Mappings;
|
||||||
|
|
||||||
|
namespace WireMock.Extensions;
|
||||||
|
|
||||||
|
public static class ResponseModelExtensions
|
||||||
|
{
|
||||||
|
private const string DefaultStatusCode = "200";
|
||||||
|
|
||||||
|
public static string GetStatusCodeAsString(this ResponseModel response)
|
||||||
|
{
|
||||||
|
return response.StatusCode switch
|
||||||
|
{
|
||||||
|
string statusCodeAsString => statusCodeAsString,
|
||||||
|
|
||||||
|
int statusCodeAsInt => statusCodeAsInt.ToString(),
|
||||||
|
|
||||||
|
_ => response.StatusCode?.ToString() ?? DefaultStatusCode
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|||||||
namespace WireMock.Handlers
|
namespace WireMock.Handlers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handler to interact with the file system to handle folders and read and write static mapping files.
|
/// Handler to interact with the file system to handle folders and read and write (static mapping) files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IFileSystemHandler
|
public interface IFileSystemHandler
|
||||||
{
|
{
|
||||||
@@ -83,6 +83,14 @@ namespace WireMock.Handlers
|
|||||||
/// <param name="bytes">The bytes.</param>
|
/// <param name="bytes">The bytes.</param>
|
||||||
void WriteFile([NotNull] string filename, [NotNull] byte[] bytes);
|
void WriteFile([NotNull] string filename, [NotNull] byte[] bytes);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Write a file.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">The folder.</param>
|
||||||
|
/// <param name="filename">The filename.</param>
|
||||||
|
/// <param name="bytes">The bytes.</param>
|
||||||
|
void WriteFile([NotNull] string folder, [NotNull] string filename, [NotNull] byte[] bytes);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read a file as bytes.
|
/// Read a file as bytes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,138 +1,137 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
|
|
||||||
namespace WireMock
|
namespace WireMock;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IRequestMessage
|
||||||
|
/// </summary>
|
||||||
|
public interface IRequestMessage
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IRequestMessage
|
/// Gets the Client IP Address.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IRequestMessage
|
string ClientIP { get; }
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the Client IP Address.
|
|
||||||
/// </summary>
|
|
||||||
string ClientIP { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the url (relative).
|
/// Gets the url (relative).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Url { get; }
|
string Url { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the AbsoluteUrl.
|
/// Gets the AbsoluteUrl.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string AbsoluteUrl { get; }
|
string AbsoluteUrl { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ProxyUrl (if a proxy is used).
|
/// The ProxyUrl (if a proxy is used).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string ProxyUrl { get; }
|
string ProxyUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the DateTime.
|
/// Gets the DateTime.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
DateTime DateTime { get; }
|
DateTime DateTime { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path (relative).
|
/// Gets the path (relative).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Path { get; }
|
string Path { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the AbsolutePath.
|
/// Gets the AbsolutePath.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string AbsolutePath { get; }
|
string AbsolutePath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path segments.
|
/// Gets the path segments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string[] PathSegments { get; }
|
string[] PathSegments { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the absolute path segments.
|
/// Gets the absolute path segments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string[] AbsolutePathSegments { get; }
|
string[] AbsolutePathSegments { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the method.
|
/// Gets the method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Method { get; }
|
string Method { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the headers.
|
/// Gets the headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IDictionary<string, WireMockList<string>> Headers { get; }
|
IDictionary<string, WireMockList<string>>? Headers { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the cookies.
|
/// Gets the cookies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IDictionary<string, string> Cookies { get; }
|
IDictionary<string, string>? Cookies { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the query.
|
/// Gets the query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IDictionary<string, WireMockList<string>> Query { get; }
|
IDictionary<string, WireMockList<string>>? Query { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the raw query.
|
/// Gets the raw query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string RawQuery { get; }
|
string RawQuery { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body.
|
/// The body.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IBodyData BodyData { get; }
|
IBodyData? BodyData { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original body as string. Convenience getter for Handlebars.
|
/// The original body as string. Convenience getter for Handlebars.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Body { get; }
|
string Body { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as JSON object). Convenience getter for Handlebars.
|
/// The body (as JSON object). Convenience getter for Handlebars.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
object BodyAsJson { get; }
|
object BodyAsJson { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as bytearray). Convenience getter for Handlebars.
|
/// The body (as bytearray). Convenience getter for Handlebars.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
byte[] BodyAsBytes { get; }
|
byte[] BodyAsBytes { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected body type. Convenience getter for Handlebars.
|
/// The detected body type. Convenience getter for Handlebars.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string DetectedBodyType { get; }
|
string DetectedBodyType { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected body type from the Content-Type header. Convenience getter for Handlebars.
|
/// The detected body type from the Content-Type header. Convenience getter for Handlebars.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string DetectedBodyTypeFromContentType { get; }
|
string DetectedBodyTypeFromContentType { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected compression from the Content-Encoding header. Convenience getter for Handlebars.
|
/// The detected compression from the Content-Encoding header. Convenience getter for Handlebars.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string DetectedCompression { get; }
|
string DetectedCompression { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Host
|
/// Gets the Host
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Host { get; }
|
string Host { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the protocol
|
/// Gets the protocol
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Protocol { get; }
|
string Protocol { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the port
|
/// Gets the port
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int Port { get; }
|
int Port { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the origin
|
/// Gets the origin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Origin { get; }
|
string Origin { get; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WireMock.ResponseBuilders;
|
using WireMock.ResponseBuilders;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
@@ -13,7 +13,7 @@ namespace WireMock
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Body.
|
/// The Body.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IBodyData BodyData { get; }
|
IBodyData? BodyData { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the body destination (SameAsSource, String or Bytes).
|
/// Gets the body destination (SameAsSource, String or Bytes).
|
||||||
@@ -38,7 +38,7 @@ namespace WireMock
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the headers.
|
/// Gets the headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IDictionary<string, WireMockList<string>> Headers { get; }
|
IDictionary<string, WireMockList<string>>? Headers { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the status code.
|
/// Gets or sets the status code.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using WireMock.Admin.Requests;
|
using WireMock.Admin.Requests;
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ namespace WireMock.Logging
|
|||||||
/// <param name="args">The arguments.</param>
|
/// <param name="args">The arguments.</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
[StringFormatMethod("formatString")]
|
[StringFormatMethod("formatString")]
|
||||||
void Debug([NotNull] string formatString, [NotNull] params object[] args);
|
void Debug(string formatString, params object[] args);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes the message at the Info level using the specified parameters.
|
/// Writes the message at the Info level using the specified parameters.
|
||||||
@@ -26,7 +26,7 @@ namespace WireMock.Logging
|
|||||||
/// <param name="args">The arguments.</param>
|
/// <param name="args">The arguments.</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
[StringFormatMethod("formatString")]
|
[StringFormatMethod("formatString")]
|
||||||
void Info([NotNull] string formatString, [NotNull] params object[] args);
|
void Info(string formatString, params object[] args);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes the message at the Warning level using the specified parameters.
|
/// Writes the message at the Warning level using the specified parameters.
|
||||||
@@ -35,7 +35,7 @@ namespace WireMock.Logging
|
|||||||
/// <param name="args">The arguments.</param>
|
/// <param name="args">The arguments.</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
[StringFormatMethod("formatString")]
|
[StringFormatMethod("formatString")]
|
||||||
void Warn([NotNull] string formatString, [NotNull] params object[] args);
|
void Warn(string formatString, params object[] args);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes the message at the Error level using the specified parameters.
|
/// Writes the message at the Error level using the specified parameters.
|
||||||
@@ -44,7 +44,7 @@ namespace WireMock.Logging
|
|||||||
/// <param name="args">The arguments.</param>
|
/// <param name="args">The arguments.</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
[StringFormatMethod("formatString")]
|
[StringFormatMethod("formatString")]
|
||||||
void Error([NotNull] string formatString, [NotNull] params object[] args);
|
void Error(string formatString, params object[] args);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes the message at the Error level using the specified exception.
|
/// Writes the message at the Error level using the specified exception.
|
||||||
@@ -53,7 +53,7 @@ namespace WireMock.Logging
|
|||||||
/// <param name="exception">The exception.</param>
|
/// <param name="exception">The exception.</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
[StringFormatMethod("formatString")]
|
[StringFormatMethod("formatString")]
|
||||||
void Error([NotNull] string formatString, [NotNull] Exception exception);
|
void Error(string formatString, Exception exception);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes the LogEntryModel (LogRequestModel, LogResponseModel and more).
|
/// Writes the LogEntryModel (LogRequestModel, LogResponseModel and more).
|
||||||
@@ -61,6 +61,6 @@ namespace WireMock.Logging
|
|||||||
/// <param name="logEntryModel">The Request Log Model.</param>
|
/// <param name="logEntryModel">The Request Log Model.</param>
|
||||||
/// <param name="isAdminRequest">Defines if this request is an admin request.</param>
|
/// <param name="isAdminRequest">Defines if this request is an admin request.</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
void DebugRequestResponse([NotNull] LogEntryModel logEntryModel, bool isAdminRequest);
|
void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WireMock.Matchers.Request
|
namespace WireMock.Matchers.Request
|
||||||
@@ -44,5 +44,13 @@ namespace WireMock.Matchers.Request
|
|||||||
/// The match-score.
|
/// The match-score.
|
||||||
/// </value>
|
/// </value>
|
||||||
double TotalScore { get; }
|
double TotalScore { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds the score.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="matcherType">The matcher Type.</param>
|
||||||
|
/// <param name="score">The score.</param>
|
||||||
|
/// <returns>The score.</returns>
|
||||||
|
double AddScore(Type matcherType, double score);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
namespace WireMock.Matchers.Request
|
namespace WireMock.Matchers.Request
|
||||||
{
|
{
|
||||||
@@ -15,6 +15,6 @@ namespace WireMock.Matchers.Request
|
|||||||
/// <returns>
|
/// <returns>
|
||||||
/// A value between 0.0 - 1.0 of the similarity.
|
/// A value between 0.0 - 1.0 of the similarity.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
double GetMatchingScore([NotNull] IRequestMessage requestMessage, [NotNull] RequestMatchResult requestMatchResult);
|
double GetMatchingScore(IRequestMessage requestMessage, IRequestMatchResult requestMatchResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,61 +1,62 @@
|
|||||||
using System.Text;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Text;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
|
|
||||||
namespace WireMock.Util
|
namespace WireMock.Util;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IBodyData
|
||||||
|
/// </summary>
|
||||||
|
public interface IBodyData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IBodyData
|
/// The body (as bytearray).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBodyData
|
byte[] BodyAsBytes { get; set; }
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The body (as bytearray).
|
|
||||||
/// </summary>
|
|
||||||
byte[] BodyAsBytes { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body as a file.
|
/// Gets or sets the body as a file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string BodyAsFile { get; set; }
|
string BodyAsFile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is the body as file cached?
|
/// Is the body as file cached?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool? BodyAsFileIsCached { get; set; }
|
bool? BodyAsFileIsCached { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body (as JSON object).
|
/// The body (as JSON object).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
object BodyAsJson { get; set; }
|
object? BodyAsJson { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether child objects to be indented according to the Newtonsoft.Json.JsonTextWriter.Indentation and Newtonsoft.Json.JsonTextWriter.IndentChar settings.
|
/// Gets or sets a value indicating whether child objects to be indented according to the Newtonsoft.Json.JsonTextWriter.Indentation and Newtonsoft.Json.JsonTextWriter.IndentChar settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool? BodyAsJsonIndented { get; set; }
|
bool? BodyAsJsonIndented { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body as string, this is defined when BodyAsString or BodyAsJson are not null.
|
/// The body as string, this is defined when BodyAsString or BodyAsJson are not null.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string BodyAsString { get; set; }
|
string BodyAsString { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected body type (detection based on body content).
|
/// The detected body type (detection based on body content).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BodyType DetectedBodyType { get; set; }
|
BodyType? DetectedBodyType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected body type (detection based on Content-Type).
|
/// The detected body type (detection based on Content-Type).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BodyType DetectedBodyTypeFromContentType { get; set; }
|
BodyType? DetectedBodyTypeFromContentType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The detected compression.
|
/// The detected compression.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string DetectedCompression { get; set; }
|
string? DetectedCompression { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body encoding.
|
/// The body encoding.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Encoding Encoding { get; set; }
|
Encoding? Encoding { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -22,12 +22,12 @@ namespace WireMock.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Headers to send.
|
/// The Headers to send.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IDictionary<string, WireMockList<string>> Headers { get; }
|
IDictionary<string, WireMockList<string>>? Headers { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The body to send.
|
/// The body to send.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IBodyData BodyData { get; set; }
|
IBodyData? BodyData { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use Transformer.
|
/// Use Transformer.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.Specialized;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
|
using WireMock.Matchers.Request;
|
||||||
|
|
||||||
namespace WireMock.Server
|
namespace WireMock.Server
|
||||||
{
|
{
|
||||||
@@ -38,11 +39,31 @@ namespace WireMock.Server
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
List<int> Ports { get; }
|
List<int> Ports { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the first port.
|
||||||
|
/// </summary>
|
||||||
|
int Port { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the urls.
|
/// Gets the urls.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string[] Urls { get; }
|
string[] Urls { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the first url.
|
||||||
|
/// </summary>
|
||||||
|
string? Url { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the consumer.
|
||||||
|
/// </summary>
|
||||||
|
string? Consumer { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the provider.
|
||||||
|
/// </summary>
|
||||||
|
string? Provider { get; }
|
||||||
|
|
||||||
//ConcurrentDictionary<string, ScenarioState> Scenarios { get; }
|
//ConcurrentDictionary<string, ScenarioState> Scenarios { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -84,7 +105,7 @@ namespace WireMock.Server
|
|||||||
|
|
||||||
//IEnumerable<LogEntry> FindLogEntries([NotNull] params IRequestMatcher[] matchers);
|
//IEnumerable<LogEntry> FindLogEntries([NotNull] params IRequestMatcher[] matchers);
|
||||||
|
|
||||||
//IRespondWithAProvider Given(IRequestMatcher requestMatcher, bool saveToFile = false);
|
// IRespondWithAProvider Given(IRequestMatcher requestMatcher, bool saveToFile = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a static mapping file and adds or updates a single mapping.
|
/// Reads a static mapping file and adds or updates a single mapping.
|
||||||
@@ -92,7 +113,7 @@ namespace WireMock.Server
|
|||||||
/// Calling this method manually forces WireMock.Net to read and apply the specified static mapping file.
|
/// Calling this method manually forces WireMock.Net to read and apply the specified static mapping file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path to the static mapping file.</param>
|
/// <param name="path">The path to the static mapping file.</param>
|
||||||
bool ReadStaticMappingAndAddOrUpdate([NotNull] string path);
|
bool ReadStaticMappingAndAddOrUpdate(string path);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the static mappings from a folder.
|
/// Reads the static mappings from a folder.
|
||||||
@@ -101,7 +122,7 @@ namespace WireMock.Server
|
|||||||
/// Calling this method manually forces WireMock.Net to read and apply all static mapping files in the specified folder.
|
/// Calling this method manually forces WireMock.Net to read and apply all static mapping files in the specified folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
||||||
void ReadStaticMappings([CanBeNull] string folder = null);
|
void ReadStaticMappings(string? folder = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes the authentication.
|
/// Removes the authentication.
|
||||||
@@ -132,33 +153,33 @@ namespace WireMock.Server
|
|||||||
/// Saves the static mappings.
|
/// Saves the static mappings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
||||||
void SaveStaticMappings([CanBeNull] string folder = null);
|
void SaveStaticMappings(string? folder = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the basic authentication.
|
/// Sets the basic authentication.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tenant">The Tenant.</param>
|
/// <param name="tenant">The Tenant.</param>
|
||||||
/// <param name="audience">The Audience or Resource.</param>
|
/// <param name="audience">The Audience or Resource.</param>
|
||||||
void SetAzureADAuthentication([NotNull] string tenant, [NotNull] string audience);
|
void SetAzureADAuthentication(string tenant, string audience);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the basic authentication.
|
/// Sets the basic authentication.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="username">The username.</param>
|
/// <param name="username">The username.</param>
|
||||||
/// <param name="password">The password.</param>
|
/// <param name="password">The password.</param>
|
||||||
void SetBasicAuthentication([NotNull] string username, [NotNull] string password);
|
void SetBasicAuthentication(string username, string password);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the maximum RequestLog count.
|
/// Sets the maximum RequestLog count.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="maxRequestLogCount">The maximum RequestLog count.</param>
|
/// <param name="maxRequestLogCount">The maximum RequestLog count.</param>
|
||||||
void SetMaxRequestLogCount([CanBeNull] int? maxRequestLogCount);
|
void SetMaxRequestLogCount(int? maxRequestLogCount);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets RequestLog expiration in hours.
|
/// Sets RequestLog expiration in hours.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestLogExpirationDuration">The RequestLog expiration in hours.</param>
|
/// <param name="requestLogExpirationDuration">The RequestLog expiration in hours.</param>
|
||||||
void SetRequestLogExpirationDuration([CanBeNull] int? requestLogExpirationDuration);
|
void SetRequestLogExpirationDuration(int? requestLogExpirationDuration);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop this server.
|
/// Stop this server.
|
||||||
@@ -169,7 +190,7 @@ namespace WireMock.Server
|
|||||||
/// Watches the static mappings for changes.
|
/// Watches the static mappings for changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
||||||
void WatchStaticMappings([CanBeNull] string folder = null);
|
void WatchStaticMappings(string? folder = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register the mappings (via <see cref="MappingModel"/>).
|
/// Register the mappings (via <see cref="MappingModel"/>).
|
||||||
|
|||||||
@@ -31,14 +31,21 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
|
|
||||||
<!-- See also https://mstack.nl/blog/20210801-source-generators -->
|
<!-- See also https://mstack.nl/blog/20210801-source-generators -->
|
||||||
<PackageReference Include="FluentBuilder" Version="0.4.1">
|
<PackageReference Include="FluentBuilder" Version="0.4.9">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!--<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
|
||||||
|
<PackageReference Include="Nullable" Version="1.2.1">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>-->
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,130 +1,132 @@
|
|||||||
|
#pragma warning disable CS1591
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using FluentAssertions.Execution;
|
using FluentAssertions.Execution;
|
||||||
using WireMock.Server;
|
using WireMock.Server;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace WireMock.FluentAssertions
|
namespace WireMock.FluentAssertions;
|
||||||
|
|
||||||
|
public class WireMockAssertions
|
||||||
{
|
{
|
||||||
public class WireMockAssertions
|
private readonly IWireMockServer _subject;
|
||||||
|
private readonly int? _callsCount;
|
||||||
|
|
||||||
|
public WireMockAssertions(IWireMockServer subject, int? callsCount)
|
||||||
{
|
{
|
||||||
private readonly IWireMockServer _subject;
|
_subject = subject;
|
||||||
|
_callsCount = callsCount;
|
||||||
|
}
|
||||||
|
|
||||||
public WireMockAssertions(IWireMockServer subject, int? callsCount)
|
[CustomAssertion]
|
||||||
|
public AndConstraint<WireMockAssertions> AtAbsoluteUrl(string absoluteUrl, string because = "", params object[] becauseArgs)
|
||||||
|
{
|
||||||
|
Execute.Assertion
|
||||||
|
.BecauseOf(because, becauseArgs)
|
||||||
|
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
||||||
|
.ForCondition(requests => requests.Any())
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called at address matching the absolute url {0}{reason}, but no calls were made.",
|
||||||
|
absoluteUrl)
|
||||||
|
.Then
|
||||||
|
.ForCondition(x => _callsCount == null && x.Any(y => y.AbsoluteUrl == absoluteUrl) || _callsCount == x.Count(y => y.AbsoluteUrl == absoluteUrl))
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called at address matching the absolute url {0}{reason}, but didn't find it among the calls to {1}.",
|
||||||
|
_ => absoluteUrl, requests => requests.Select(request => request.AbsoluteUrl));
|
||||||
|
|
||||||
|
return new AndConstraint<WireMockAssertions>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[CustomAssertion]
|
||||||
|
public AndConstraint<WireMockAssertions> AtUrl(string url, string because = "", params object[] becauseArgs)
|
||||||
|
{
|
||||||
|
Execute.Assertion
|
||||||
|
.BecauseOf(because, becauseArgs)
|
||||||
|
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
||||||
|
.ForCondition(requests => requests.Any())
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called at address matching the url {0}{reason}, but no calls were made.",
|
||||||
|
url)
|
||||||
|
.Then
|
||||||
|
.ForCondition(x => _callsCount == null && x.Any(y => y.Url == url) || _callsCount == x.Count(y => y.Url == url))
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called at address matching the url {0}{reason}, but didn't find it among the calls to {1}.",
|
||||||
|
_ => url, requests => requests.Select(request => request.Url));
|
||||||
|
|
||||||
|
return new AndConstraint<WireMockAssertions>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[CustomAssertion]
|
||||||
|
public AndConstraint<WireMockAssertions> WithProxyUrl(string proxyUrl, string because = "", params object[] becauseArgs)
|
||||||
|
{
|
||||||
|
Execute.Assertion
|
||||||
|
.BecauseOf(because, becauseArgs)
|
||||||
|
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
||||||
|
.ForCondition(requests => requests.Any())
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called with proxy url {0}{reason}, but no calls were made.",
|
||||||
|
proxyUrl)
|
||||||
|
.Then
|
||||||
|
.ForCondition(x => _callsCount == null && x.Any(y => y.ProxyUrl == proxyUrl) || _callsCount == x.Count(y => y.ProxyUrl == proxyUrl))
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called with proxy url {0}{reason}, but didn't find it among the calls with {1}.",
|
||||||
|
_ => proxyUrl, requests => requests.Select(request => request.ProxyUrl));
|
||||||
|
|
||||||
|
return new AndConstraint<WireMockAssertions>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[CustomAssertion]
|
||||||
|
public AndConstraint<WireMockAssertions> FromClientIP(string clientIP, string because = "", params object[] becauseArgs)
|
||||||
|
{
|
||||||
|
Execute.Assertion
|
||||||
|
.BecauseOf(because, becauseArgs)
|
||||||
|
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
||||||
|
.ForCondition(requests => requests.Any())
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called from client IP {0}{reason}, but no calls were made.",
|
||||||
|
clientIP)
|
||||||
|
.Then
|
||||||
|
.ForCondition(x => _callsCount == null && x.Any(y => y.ClientIP == clientIP) || _callsCount == x.Count(y => y.ClientIP == clientIP))
|
||||||
|
.FailWith(
|
||||||
|
"Expected {context:wiremockserver} to have been called from client IP {0}{reason}, but didn't find it among the calls from IP(s) {1}.",
|
||||||
|
_ => clientIP, requests => requests.Select(request => request.ClientIP));
|
||||||
|
|
||||||
|
return new AndConstraint<WireMockAssertions>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[CustomAssertion]
|
||||||
|
public AndConstraint<WireMockAssertions> WithHeader(string expectedKey, string value, string because = "", params object[] becauseArgs)
|
||||||
|
=> WithHeader(expectedKey, new[] { value }, because, becauseArgs);
|
||||||
|
|
||||||
|
[CustomAssertion]
|
||||||
|
public AndConstraint<WireMockAssertions> WithHeader(string expectedKey, string[] expectedValues, string because = "", params object[] becauseArgs)
|
||||||
|
{
|
||||||
|
var headersDictionary = _subject.LogEntries.SelectMany(x => x.RequestMessage.Headers)
|
||||||
|
.ToDictionary(x => x.Key, x => x.Value);
|
||||||
|
|
||||||
|
using (new AssertionScope("headers from requests sent"))
|
||||||
{
|
{
|
||||||
_subject = subject;
|
headersDictionary.Should().ContainKey(expectedKey, because, becauseArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
[CustomAssertion]
|
using (new AssertionScope($"header \"{expectedKey}\" from requests sent with value(s)"))
|
||||||
public AndConstraint<WireMockAssertions> AtAbsoluteUrl(string absoluteUrl, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
{
|
||||||
Execute.Assertion
|
if (expectedValues.Length == 1)
|
||||||
.BecauseOf(because, becauseArgs)
|
|
||||||
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
|
||||||
.ForCondition(requests => requests.Any())
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called at address matching the absolute url {0}{reason}, but no calls were made.",
|
|
||||||
absoluteUrl)
|
|
||||||
.Then
|
|
||||||
.ForCondition(x => x.Any(y => y.AbsoluteUrl == absoluteUrl))
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called at address matching the absolute url {0}{reason}, but didn't find it among the calls to {1}.",
|
|
||||||
_ => absoluteUrl, requests => requests.Select(request => request.AbsoluteUrl));
|
|
||||||
|
|
||||||
return new AndConstraint<WireMockAssertions>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
[CustomAssertion]
|
|
||||||
public AndConstraint<WireMockAssertions> WithHeader(string expectedKey, string value, string because = "", params object[] becauseArgs)
|
|
||||||
=> WithHeader(expectedKey, new[] { value }, because, becauseArgs);
|
|
||||||
|
|
||||||
[CustomAssertion]
|
|
||||||
public AndConstraint<WireMockAssertions> WithHeader(string expectedKey, string[] expectedValues, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
|
||||||
var headersDictionary = _subject.LogEntries.SelectMany(x => x.RequestMessage.Headers)
|
|
||||||
.ToDictionary(x => x.Key, x => x.Value);
|
|
||||||
|
|
||||||
using (new AssertionScope("headers from requests sent"))
|
|
||||||
{
|
{
|
||||||
headersDictionary.Should().ContainKey(expectedKey, because, becauseArgs);
|
headersDictionary[expectedKey].Should().Contain(expectedValues.First());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
using (new AssertionScope($"header \"{expectedKey}\" from requests sent with value(s)"))
|
|
||||||
{
|
{
|
||||||
if (expectedValues.Length == 1)
|
var trimmedHeaderValues = string.Join(",", headersDictionary[expectedKey].Select(x => x)).Split(',')
|
||||||
|
.Select(x => x.Trim())
|
||||||
|
.ToList();
|
||||||
|
foreach (var expectedValue in expectedValues)
|
||||||
{
|
{
|
||||||
headersDictionary[expectedKey].Should().Contain(expectedValues.First());
|
trimmedHeaderValues.Should().Contain(expectedValue);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var trimmedHeaderValues = string.Join(",", headersDictionary[expectedKey].Select(x => x)).Split(',')
|
|
||||||
.Select(x => x.Trim())
|
|
||||||
.ToList();
|
|
||||||
foreach (var expectedValue in expectedValues)
|
|
||||||
{
|
|
||||||
trimmedHeaderValues.Should().Contain(expectedValue);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new AndConstraint<WireMockAssertions>(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[CustomAssertion]
|
return new AndConstraint<WireMockAssertions>(this);
|
||||||
public AndConstraint<WireMockAssertions> AtUrl(string url, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
|
||||||
Execute.Assertion
|
|
||||||
.BecauseOf(because, becauseArgs)
|
|
||||||
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
|
||||||
.ForCondition(requests => requests.Any())
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called at address matching the url {0}{reason}, but no calls were made.",
|
|
||||||
url)
|
|
||||||
.Then
|
|
||||||
.ForCondition(x => x.Any(y => y.Url == url))
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called at address matching the url {0}{reason}, but didn't find it among the calls to {1}.",
|
|
||||||
_ => url, requests => requests.Select(request => request.Url));
|
|
||||||
|
|
||||||
return new AndConstraint<WireMockAssertions>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
[CustomAssertion]
|
|
||||||
public AndConstraint<WireMockAssertions> WithProxyUrl(string proxyUrl, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
|
||||||
Execute.Assertion
|
|
||||||
.BecauseOf(because, becauseArgs)
|
|
||||||
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
|
||||||
.ForCondition(requests => requests.Any())
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called with proxy url {0}{reason}, but no calls were made.",
|
|
||||||
proxyUrl)
|
|
||||||
.Then
|
|
||||||
.ForCondition(x => x.Any(y => y.ProxyUrl == proxyUrl))
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called with proxy url {0}{reason}, but didn't find it among the calls with {1}.",
|
|
||||||
_ => proxyUrl, requests => requests.Select(request => request.ProxyUrl));
|
|
||||||
|
|
||||||
return new AndConstraint<WireMockAssertions>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
[CustomAssertion]
|
|
||||||
public AndConstraint<WireMockAssertions> FromClientIP(string clientIP, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
|
||||||
Execute.Assertion
|
|
||||||
.BecauseOf(because, becauseArgs)
|
|
||||||
.Given(() => _subject.LogEntries.Select(x => x.RequestMessage).ToList())
|
|
||||||
.ForCondition(requests => requests.Any())
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called from client IP {0}{reason}, but no calls were made.",
|
|
||||||
clientIP)
|
|
||||||
.Then
|
|
||||||
.ForCondition(x => x.Any(y => y.ClientIP == clientIP))
|
|
||||||
.FailWith(
|
|
||||||
"Expected {context:wiremockserver} to have been called from client IP {0}{reason}, but didn't find it among the calls from IP(s) {1}.",
|
|
||||||
_ => clientIP, requests => requests.Select(request => request.ClientIP));
|
|
||||||
|
|
||||||
return new AndConstraint<WireMockAssertions>(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,15 @@ namespace WireMock.FluentAssertions
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Asserts if <see cref="IWireMockServer"/> has received no calls.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><see cref="WireMockAssertions"/></returns>
|
||||||
|
public WireMockAssertions HaveReceivedNoCalls()
|
||||||
|
{
|
||||||
|
return new WireMockAssertions(Subject, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Asserts if <see cref="IWireMockServer"/> has received a call.
|
/// Asserts if <see cref="IWireMockServer"/> has received a call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net451' or '$(TargetFramework)' == 'netstandard1.3'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net451' or '$(TargetFramework)' == 'netstandard1.3'">
|
||||||
|
|||||||
@@ -3,138 +3,137 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using AnyOfTypes;
|
using AnyOfTypes;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using Stef.Validation;
|
||||||
using WireMock.Exceptions;
|
using WireMock.Exceptions;
|
||||||
using WireMock.Extensions;
|
using WireMock.Extensions;
|
||||||
using WireMock.Models;
|
using WireMock.Models;
|
||||||
using Stef.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Matchers
|
namespace WireMock.Matchers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CSharpCode / CS-Script Matcher
|
||||||
|
/// </summary>
|
||||||
|
/// <inheritdoc cref="ICSharpCodeMatcher"/>
|
||||||
|
internal class CSharpCodeMatcher : ICSharpCodeMatcher
|
||||||
{
|
{
|
||||||
/// <summary>
|
private const string TemplateForIsMatchWithString = "public class CodeHelper {{ public bool IsMatch(string it) {{ {0} }} }}";
|
||||||
/// CSharpCode / CS-Script Matcher
|
|
||||||
/// </summary>
|
private const string TemplateForIsMatchWithDynamic = "public class CodeHelper {{ public bool IsMatch(dynamic it) {{ {0} }} }}";
|
||||||
/// <inheritdoc cref="ICSharpCodeMatcher"/>
|
|
||||||
internal class CSharpCodeMatcher : ICSharpCodeMatcher
|
private readonly string[] _usings =
|
||||||
{
|
{
|
||||||
private const string TemplateForIsMatchWithString = "public class CodeHelper {{ public bool IsMatch(string it) {{ {0} }} }}";
|
"System",
|
||||||
|
"System.Linq",
|
||||||
|
"System.Collections.Generic",
|
||||||
|
"Microsoft.CSharp",
|
||||||
|
"Newtonsoft.Json.Linq"
|
||||||
|
};
|
||||||
|
|
||||||
private const string TemplateForIsMatchWithDynamic = "public class CodeHelper {{ public bool IsMatch(dynamic it) {{ {0} }} }}";
|
public MatchBehaviour MatchBehaviour { get; }
|
||||||
|
|
||||||
private readonly string[] _usings =
|
/// <inheritdoc cref="IMatcher.ThrowException"/>
|
||||||
{
|
public bool ThrowException { get; }
|
||||||
"System",
|
|
||||||
"System.Linq",
|
private readonly AnyOf<string, StringPattern>[] _patterns;
|
||||||
"System.Collections.Generic",
|
|
||||||
"Microsoft.CSharp",
|
/// <summary>
|
||||||
"Newtonsoft.Json.Linq"
|
/// Initializes a new instance of the <see cref="CSharpCodeMatcher"/> class.
|
||||||
};
|
/// </summary>
|
||||||
|
/// <param name="patterns">The patterns.</param>
|
||||||
public MatchBehaviour MatchBehaviour { get; }
|
public CSharpCodeMatcher(params AnyOf<string, StringPattern>[] patterns) : this(MatchBehaviour.AcceptOnMatch, MatchOperator.Or, patterns)
|
||||||
|
{
|
||||||
/// <inheritdoc cref="IMatcher.ThrowException"/>
|
}
|
||||||
public bool ThrowException { get; }
|
|
||||||
|
/// <summary>
|
||||||
private readonly AnyOf<string, StringPattern>[] _patterns;
|
/// Initializes a new instance of the <see cref="CSharpCodeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
/// Initializes a new instance of the <see cref="CSharpCodeMatcher"/> class.
|
/// <param name="matchOperator">The <see cref="Matchers.MatchOperator"/> to use. (default = "Or")</param>
|
||||||
/// </summary>
|
/// <param name="patterns">The patterns.</param>
|
||||||
/// <param name="patterns">The patterns.</param>
|
public CSharpCodeMatcher(MatchBehaviour matchBehaviour, MatchOperator matchOperator = MatchOperator.Or, params AnyOf<string, StringPattern>[] patterns)
|
||||||
public CSharpCodeMatcher([NotNull] params AnyOf<string, StringPattern>[] patterns) : this(MatchBehaviour.AcceptOnMatch, patterns)
|
{
|
||||||
|
_patterns = Guard.NotNull(patterns);
|
||||||
|
MatchBehaviour = matchBehaviour;
|
||||||
|
ThrowException = false;
|
||||||
|
MatchOperator = matchOperator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double IsMatch(string input)
|
||||||
|
{
|
||||||
|
return IsMatchInternal(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double IsMatch(object? input)
|
||||||
|
{
|
||||||
|
return IsMatchInternal(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double IsMatchInternal(object? input)
|
||||||
|
{
|
||||||
|
double match = MatchScores.Mismatch;
|
||||||
|
|
||||||
|
if (input != null)
|
||||||
{
|
{
|
||||||
|
match = MatchScores.ToScore(_patterns.Select(pattern => IsMatch(input, pattern.GetPattern())).ToArray(), MatchOperator);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
return MatchBehaviourHelper.Convert(MatchBehaviour, match);
|
||||||
/// Initializes a new instance of the <see cref="CSharpCodeMatcher"/> class.
|
}
|
||||||
/// </summary>
|
|
||||||
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
||||||
/// <param name="patterns">The patterns.</param>
|
|
||||||
public CSharpCodeMatcher(MatchBehaviour matchBehaviour, [NotNull] params AnyOf<string, StringPattern>[] patterns)
|
|
||||||
{
|
|
||||||
Guard.NotNull(patterns, nameof(patterns));
|
|
||||||
|
|
||||||
MatchBehaviour = matchBehaviour;
|
private bool IsMatch(dynamic input, string pattern)
|
||||||
ThrowException = false;
|
{
|
||||||
_patterns = patterns;
|
bool isMatchWithString = input is string;
|
||||||
}
|
var inputValue = isMatchWithString ? input : JObject.FromObject(input);
|
||||||
|
string source = GetSourceForIsMatchWithString(pattern, isMatchWithString);
|
||||||
|
|
||||||
public double IsMatch(string input)
|
object? result;
|
||||||
{
|
|
||||||
return IsMatchInternal(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
public double IsMatch(object input)
|
|
||||||
{
|
|
||||||
return IsMatchInternal(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
public double IsMatchInternal(object input)
|
|
||||||
{
|
|
||||||
double match = MatchScores.Mismatch;
|
|
||||||
|
|
||||||
if (input != null)
|
|
||||||
{
|
|
||||||
match = MatchScores.ToScore(_patterns.Select(pattern => IsMatch(input, pattern.GetPattern())));
|
|
||||||
}
|
|
||||||
|
|
||||||
return MatchBehaviourHelper.Convert(MatchBehaviour, match);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsMatch(dynamic input, string pattern)
|
|
||||||
{
|
|
||||||
bool isMatchWithString = input is string;
|
|
||||||
var inputValue = isMatchWithString ? input : JObject.FromObject(input);
|
|
||||||
string source = GetSourceForIsMatchWithString(pattern, isMatchWithString);
|
|
||||||
|
|
||||||
object result = null;
|
|
||||||
|
|
||||||
#if (NET451 || NET452)
|
#if (NET451 || NET452)
|
||||||
var compilerParams = new System.CodeDom.Compiler.CompilerParameters
|
var compilerParams = new System.CodeDom.Compiler.CompilerParameters
|
||||||
|
{
|
||||||
|
GenerateInMemory = true,
|
||||||
|
GenerateExecutable = false,
|
||||||
|
ReferencedAssemblies =
|
||||||
{
|
{
|
||||||
GenerateInMemory = true,
|
"System.dll",
|
||||||
GenerateExecutable = false,
|
"System.Core.dll",
|
||||||
ReferencedAssemblies =
|
"Microsoft.CSharp.dll",
|
||||||
{
|
"Newtonsoft.Json.dll"
|
||||||
"System.dll",
|
|
||||||
"System.Core.dll",
|
|
||||||
"Microsoft.CSharp.dll",
|
|
||||||
"Newtonsoft.Json.dll"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
using (var codeProvider = new Microsoft.CSharp.CSharpCodeProvider())
|
|
||||||
{
|
|
||||||
var compilerResults = codeProvider.CompileAssemblyFromSource(compilerParams, source);
|
|
||||||
|
|
||||||
if (compilerResults.Errors.Count != 0)
|
|
||||||
{
|
|
||||||
var errors = from System.CodeDom.Compiler.CompilerError er in compilerResults.Errors select er.ToString();
|
|
||||||
throw new WireMockException(string.Join(", ", errors));
|
|
||||||
}
|
|
||||||
|
|
||||||
object helper = compilerResults.CompiledAssembly.CreateInstance("CodeHelper");
|
|
||||||
if (helper == null)
|
|
||||||
{
|
|
||||||
throw new WireMockException("CSharpCodeMatcher: Unable to create instance from WireMock.CodeHelper");
|
|
||||||
}
|
|
||||||
|
|
||||||
var methodInfo = helper.GetType().GetMethod("IsMatch");
|
|
||||||
if (methodInfo == null)
|
|
||||||
{
|
|
||||||
throw new WireMockException("CSharpCodeMatcher: Unable to find method 'IsMatch' in WireMock.CodeHelper");
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
result = methodInfo.Invoke(helper, new[] { inputValue });
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
throw new WireMockException("CSharpCodeMatcher: Unable to call method 'IsMatch' in WireMock.CodeHelper", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
using (var codeProvider = new Microsoft.CSharp.CSharpCodeProvider())
|
||||||
|
{
|
||||||
|
var compilerResults = codeProvider.CompileAssemblyFromSource(compilerParams, source);
|
||||||
|
|
||||||
|
if (compilerResults.Errors.Count != 0)
|
||||||
|
{
|
||||||
|
var errors = from System.CodeDom.Compiler.CompilerError er in compilerResults.Errors select er.ToString();
|
||||||
|
throw new WireMockException(string.Join(", ", errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
var helper = compilerResults.CompiledAssembly?.CreateInstance("CodeHelper");
|
||||||
|
if (helper == null)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to create instance from WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
|
||||||
|
var methodInfo = helper.GetType().GetMethod("IsMatch");
|
||||||
|
if (methodInfo == null)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to find method 'IsMatch' in WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = methodInfo.Invoke(helper, new[] { inputValue });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to call method 'IsMatch' in WireMock.CodeHelper", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
#elif (NET46 || NET461)
|
#elif (NET46 || NET461)
|
||||||
dynamic script;
|
dynamic script;
|
||||||
try
|
try
|
||||||
@@ -169,11 +168,7 @@ namespace WireMock.Matchers
|
|||||||
dynamic script;
|
dynamic script;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//#if NETSTANDARD2_0
|
|
||||||
// script = csscript.GenericExtensions.CreateObject(assembly, "*");
|
|
||||||
//#else
|
|
||||||
script = CSScripting.ReflectionExtensions.CreateObject(assembly, "*");
|
script = CSScripting.ReflectionExtensions.CreateObject(assembly, "*");
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -191,38 +186,40 @@ namespace WireMock.Matchers
|
|||||||
#else
|
#else
|
||||||
throw new NotSupportedException("The 'CSharpCodeMatcher' cannot be used in netstandard 1.3");
|
throw new NotSupportedException("The 'CSharpCodeMatcher' cannot be used in netstandard 1.3");
|
||||||
#endif
|
#endif
|
||||||
try
|
try
|
||||||
{
|
|
||||||
return (bool)result;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
throw new WireMockException($"Unable to cast result '{result}' to bool");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetSourceForIsMatchWithString(string pattern, bool isMatchWithString)
|
|
||||||
{
|
{
|
||||||
string template = isMatchWithString ? TemplateForIsMatchWithString : TemplateForIsMatchWithDynamic;
|
return (bool)result;
|
||||||
|
|
||||||
var stringBuilder = new StringBuilder();
|
|
||||||
foreach (string @using in _usings)
|
|
||||||
{
|
|
||||||
stringBuilder.AppendLine($"using {@using};");
|
|
||||||
}
|
|
||||||
stringBuilder.AppendLine();
|
|
||||||
stringBuilder.AppendFormat(template, pattern);
|
|
||||||
|
|
||||||
return stringBuilder.ToString();
|
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
|
||||||
public AnyOf<string, StringPattern>[] GetPatterns()
|
|
||||||
{
|
{
|
||||||
return _patterns;
|
throw new WireMockException($"Unable to cast result '{result}' to bool");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IMatcher.Name"/>
|
|
||||||
public string Name => "CSharpCodeMatcher";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetSourceForIsMatchWithString(string pattern, bool isMatchWithString)
|
||||||
|
{
|
||||||
|
string template = isMatchWithString ? TemplateForIsMatchWithString : TemplateForIsMatchWithDynamic;
|
||||||
|
|
||||||
|
var stringBuilder = new StringBuilder();
|
||||||
|
foreach (string @using in _usings)
|
||||||
|
{
|
||||||
|
stringBuilder.AppendLine($"using {@using};");
|
||||||
|
}
|
||||||
|
stringBuilder.AppendLine();
|
||||||
|
stringBuilder.AppendFormat(template, pattern);
|
||||||
|
|
||||||
|
return stringBuilder.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
||||||
|
public AnyOf<string, StringPattern>[] GetPatterns()
|
||||||
|
{
|
||||||
|
return _patterns;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public MatchOperator MatchOperator { get; }
|
||||||
|
|
||||||
|
/// <inheritdoc cref="IMatcher.Name"/>
|
||||||
|
public string Name => "CSharpCodeMatcher";
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<Target Name="CheckIfShouldKillVBCSCompiler" />
|
<Target Name="CheckIfShouldKillVBCSCompiler" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
|
|
||||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0'">
|
||||||
<PackageReference Include="CS-Script" Version="4.4.1" />
|
<PackageReference Include="CS-Script" Version="4.4.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,36 +1,36 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>An OpenApi (swagger) parser to generate MappingModel or mapping.json file.</Description>
|
<Description>An OpenApi (swagger) parser to generate MappingModel or mapping.json file.</Description>
|
||||||
<TargetFrameworks>net46;netstandard2.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>net46;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>wiremock;openapi;OAS;converter;parser;openapiparser</PackageTags>
|
<PackageTags>wiremock;openapi;OAS;converter;parser;openapiparser</PackageTags>
|
||||||
<ProjectGuid>{D3804228-91F4-4502-9595-39584E5AADAD}</ProjectGuid>
|
<ProjectGuid>{D3804228-91F4-4502-9595-39584E5AADAD}</ProjectGuid>
|
||||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
<CodeAnalysisRuleSet>../WireMock.Net/WireMock.Net.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>../WireMock.Net/WireMock.Net.ruleset</CodeAnalysisRuleSet>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
|
||||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>8.0</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.2.3" />
|
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.2.3" />
|
||||||
<PackageReference Include="RamlToOpenApiConverter" Version="0.6.1" />
|
<PackageReference Include="RamlToOpenApiConverter" Version="0.6.1" />
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.13" />
|
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.15" />
|
||||||
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
<ProjectReference Include="..\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="RestEase" Version="1.5.5" />
|
<PackageReference Include="RestEase" Version="1.5.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user