mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-24 01:35:07 +01:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e23249c144 | ||
|
|
7a8f4c3630 | ||
|
|
ddcf2b29a3 | ||
|
|
23709fa587 | ||
|
|
3b0dc46771 | ||
|
|
f6ebb1c256 | ||
|
|
e4071b9c6a | ||
|
|
48c50e8207 | ||
|
|
acee016dec | ||
|
|
951f8e5508 | ||
|
|
1a021a7cff | ||
|
|
ced9fc58f5 | ||
|
|
24ae9a7dad | ||
|
|
919b28fa36 | ||
|
|
5de2ea44e3 | ||
|
|
ebb9f128c5 | ||
|
|
0141cc0d04 | ||
|
|
c41989c0f3 | ||
|
|
e8181e9d53 |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,3 +1,26 @@
|
|||||||
|
# 1.4.5 (11 February 2021)
|
||||||
|
- [#585](https://github.com/WireMock-Net/WireMock.Net/pull/585) - Fix response date header [bug] contributed by [wolf8196](https://github.com/wolf8196)
|
||||||
|
|
||||||
|
# 1.4.4 (09 February 2021)
|
||||||
|
- [#581](https://github.com/WireMock-Net/WireMock.Net/pull/581) - Use new Handlebars.Net.Helpers [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#582](https://github.com/WireMock-Net/WireMock.Net/pull/582) - Add Xamarin UI tests [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#568](https://github.com/WireMock-Net/WireMock.Net/issues/568) - [Question] Dates in response templates [feature]
|
||||||
|
|
||||||
|
# 1.4.3 (05 February 2021)
|
||||||
|
- [#570](https://github.com/WireMock-Net/WireMock.Net/pull/570) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.StandAlone.NETCoreApp [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#571](https://github.com/WireMock-Net/WireMock.Net/pull/571) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.Console.NETCoreApp2 [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#572](https://github.com/WireMock-Net/WireMock.Net/pull/572) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.Console.NETCoreApp [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#573](https://github.com/WireMock-Net/WireMock.Net/pull/573) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.Console.Net461.Classic [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#574](https://github.com/WireMock-Net/WireMock.Net/pull/574) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.Console.Net452.Classic [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#575](https://github.com/WireMock-Net/WireMock.Net/pull/575) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.StandAlone.Net452 [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#576](https://github.com/WireMock-Net/WireMock.Net/pull/576) - Bump log4net from 2.0.8 to 2.0.10 in /examples/WireMock.Net.Service [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#579](https://github.com/WireMock-Net/WireMock.Net/pull/579) - Net5 issue [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#577](https://github.com/WireMock-Net/WireMock.Net/issues/577) - WireMock.Net will not run with certain .net5 dependencies installed in the project [bug]
|
||||||
|
|
||||||
|
# 1.4.2 (24 January 2021)
|
||||||
|
- [#566](https://github.com/WireMock-Net/WireMock.Net/pull/566) - Do not save Mappings when SaveMappingForStatusCodePattern does not match [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#565](https://github.com/WireMock-Net/WireMock.Net/issues/565) - NullReferenceException [bug]
|
||||||
|
|
||||||
# 1.4.1 (19 January 2021)
|
# 1.4.1 (19 January 2021)
|
||||||
- [#562](https://github.com/WireMock-Net/WireMock.Net/pull/562) - Refactor Transformer (add Scriban) [feature] contributed by [StefH](https://github.com/StefH)
|
- [#562](https://github.com/WireMock-Net/WireMock.Net/pull/562) - Refactor Transformer (add Scriban) [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#214](https://github.com/WireMock-Net/WireMock.Net/issues/214) - Feature: Add support for template language DotLiquid [feature]
|
- [#214](https://github.com/WireMock-Net/WireMock.Net/issues/214) - Feature: Add support for template language DotLiquid [feature]
|
||||||
@@ -16,7 +39,6 @@
|
|||||||
- [#549](https://github.com/WireMock-Net/WireMock.Net/issues/549) - WithProxy(...) does not save the mappings to file [bug]
|
- [#549](https://github.com/WireMock-Net/WireMock.Net/issues/549) - WithProxy(...) does not save the mappings to file [bug]
|
||||||
|
|
||||||
# 1.3.8 (03 December 2020)
|
# 1.3.8 (03 December 2020)
|
||||||
- [#539](https://github.com/WireMock-Net/WireMock.Net/pull/539) - Support for partial JSON matching contributed by [gleb-osokin](https://github.com/gleb-osokin)
|
|
||||||
- [#542](https://github.com/WireMock-Net/WireMock.Net/pull/542) - Create dotnet-wiremock tool [feature] contributed by [StefH](https://github.com/StefH)
|
- [#542](https://github.com/WireMock-Net/WireMock.Net/pull/542) - Create dotnet-wiremock tool [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#543](https://github.com/WireMock-Net/WireMock.Net/pull/543) - Add support for .NET 5 [feature] contributed by [StefH](https://github.com/StefH)
|
- [#543](https://github.com/WireMock-Net/WireMock.Net/pull/543) - Add support for .NET 5 [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#544](https://github.com/WireMock-Net/WireMock.Net/pull/544) - Use Java 11 in Azure Pipelines (needed for SonarCloud) [feature] contributed by [StefH](https://github.com/StefH)
|
- [#544](https://github.com/WireMock-Net/WireMock.Net/pull/544) - Use Java 11 in Azure Pipelines (needed for SonarCloud) [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
@@ -24,6 +46,9 @@
|
|||||||
- [#547](https://github.com/WireMock-Net/WireMock.Net/pull/547) - Fix Proxying with SSL and NetCoreApp3.1 [bug] contributed by [StefH](https://github.com/StefH)
|
- [#547](https://github.com/WireMock-Net/WireMock.Net/pull/547) - Fix Proxying with SSL and NetCoreApp3.1 [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#524](https://github.com/WireMock-Net/WireMock.Net/issues/524) - Proxying with SSL Not Working in .NET Core 3.1 [bug]
|
- [#524](https://github.com/WireMock-Net/WireMock.Net/issues/524) - Proxying with SSL Not Working in .NET Core 3.1 [bug]
|
||||||
|
|
||||||
|
# 1.3.7 (17 November 2020)
|
||||||
|
- [#539](https://github.com/WireMock-Net/WireMock.Net/pull/539) - Support for partial JSON matching contributed by [gleb-osokin](https://github.com/gleb-osokin)
|
||||||
|
|
||||||
# 1.3.6 (10 November 2020)
|
# 1.3.6 (10 November 2020)
|
||||||
- [#529](https://github.com/WireMock-Net/WireMock.Net/pull/529) - Add assertions for ClientIP, Url and ProxyUrl [feature] contributed by [akamud](https://github.com/akamud)
|
- [#529](https://github.com/WireMock-Net/WireMock.Net/pull/529) - Add assertions for ClientIP, Url and ProxyUrl [feature] contributed by [akamud](https://github.com/akamud)
|
||||||
- [#535](https://github.com/WireMock-Net/WireMock.Net/pull/535) - WithCallback should use also use enum HttpStatusCode [bug] contributed by [StefH](https://github.com/StefH)
|
- [#535](https://github.com/WireMock-Net/WireMock.Net/pull/535) - WithCallback should use also use enum HttpStatusCode [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.4.1</VersionPrefix>
|
<VersionPrefix>1.4.5</VersionPrefix>
|
||||||
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
||||||
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
|
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
|
||||||
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
https://github.com/StefH/GitHubReleaseNotes
|
https://github.com/StefH/GitHubReleaseNotes
|
||||||
|
|
||||||
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc --version 1.4.1
|
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc --version 1.4.5
|
||||||
@@ -78,7 +78,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-WireMock", "src\dotn
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET5", "examples\WireMock.Net.Console.NET5\WireMock.Net.Console.NET5.csproj", "{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET5", "examples\WireMock.Net.Console.NET5\WireMock.Net.Console.NET5.csproj", "{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Matchers.CSharpCode", "src\WireMock.Net.Matchers.CSharpCode\WireMock.Net.Matchers.CSharpCode.csproj", "{6437CE56-8AB9-4D6D-90F1-70CC5BBE1572}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Matchers.CSharpCode", "src\WireMock.Net.Matchers.CSharpCode\WireMock.Net.Matchers.CSharpCode.csproj", "{B6269AAC-170A-4346-8B9A-444DED3D9A44}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.Net472.Classic", "examples\WireMock.Net.Console.Net472.Classic\WireMock.Net.Console.Net472.Classic.csproj", "{6580580B-1EFD-4922-B0EC-FF290DB279EE}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.XamarinUI.Tests", "test\WireMock.Net.XamarinUI.Tests\WireMock.Net.XamarinUI.Tests.csproj", "{0DE14F1B-A51E-4B59-A87C-C6012DCD2844}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -194,10 +198,22 @@ Global
|
|||||||
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{6437CE56-8AB9-4D6D-90F1-70CC5BBE1572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{6437CE56-8AB9-4D6D-90F1-70CC5BBE1572}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{6437CE56-8AB9-4D6D-90F1-70CC5BBE1572}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{6437CE56-8AB9-4D6D-90F1-70CC5BBE1572}.Release|Any CPU.Build.0 = Release|Any CPU
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6580580B-1EFD-4922-B0EC-FF290DB279EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6580580B-1EFD-4922-B0EC-FF290DB279EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6580580B-1EFD-4922-B0EC-FF290DB279EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6580580B-1EFD-4922-B0EC-FF290DB279EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0DE14F1B-A51E-4B59-A87C-C6012DCD2844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0DE14F1B-A51E-4B59-A87C-C6012DCD2844}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0DE14F1B-A51E-4B59-A87C-C6012DCD2844}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0DE14F1B-A51E-4B59-A87C-C6012DCD2844}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -230,7 +246,10 @@ Global
|
|||||||
{925E421A-1B3F-4202-B48F-734743573A4B} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{925E421A-1B3F-4202-B48F-734743573A4B} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{40BF24B5-12E6-4610-9489-138798632E28} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
{40BF24B5-12E6-4610-9489-138798632E28} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
{6437CE56-8AB9-4D6D-90F1-70CC5BBE1572} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
|
{B6269AAC-170A-4346-8B9A-444DED3D9A44} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
|
{6580580B-1EFD-4922-B0EC-FF290DB279EE} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
|
{0DE14F1B-A51E-4B59-A87C-C6012DCD2844} = {0BB8B634-407A-4610-A91F-11586990767A}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
|
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="1.1.0" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.8" />
|
<PackageReference Include="log4net" Version="2.0.12" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<!--<PackageReference Include="Microsoft.CodeAnalysis.Scripting.Common" Version="3.4.0" />-->
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -19,8 +19,13 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net" Version="1.9.5" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.8" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
|
<PackageReference Include="log4net" Version="2.0.10" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,13 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net" Version="1.9.5" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.8" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
|
<PackageReference Include="log4net" Version="2.0.10" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,14 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="1.1.0" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.8" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.*" />
|
||||||
<!--<PackageReference Include="Microsoft.CodeAnalysis.Scripting.Common" Version="3.4.0" />-->
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
|
<PackageReference Include="log4net" Version="2.0.12" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -3,4 +3,12 @@
|
|||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
</startup>
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -64,7 +64,7 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
HandlebarsRegistrationCallback = (handlebarsContext, fileSystemHandler) =>
|
HandlebarsRegistrationCallback = (handlebarsContext, fileSystemHandler) =>
|
||||||
{
|
{
|
||||||
var transformer = new CustomNameTransformer();
|
var transformer = new CustomNameTransformer();
|
||||||
handlebarsContext.RegisterHelper(transformer.Name, transformer.Render);
|
// handlebarsContext.RegisterHelper(transformer.Name, transformer.Render); TODO
|
||||||
},
|
},
|
||||||
|
|
||||||
// Uncomment below if you want to use the CustomFileSystemFileHandler
|
// Uncomment below if you want to use the CustomFileSystemFileHandler
|
||||||
@@ -280,7 +280,7 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.WithBody("hi"));
|
.WithBody("hi"));
|
||||||
|
|
||||||
server
|
server
|
||||||
.Given(Request.Create().WithPath("/data").UsingPost().WithBody(b => b.Contains("e")))
|
.Given(Request.Create().WithPath("/data").UsingPost().WithBody(b => b != null && b.Contains("e")))
|
||||||
.AtPriority(999)
|
.AtPriority(999)
|
||||||
.RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
.WithStatusCode(201)
|
.WithStatusCode(201)
|
||||||
|
|||||||
@@ -36,11 +36,17 @@
|
|||||||
<ApplicationIcon>..\..\WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>..\..\WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Handlebars, Version=1.9.5.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.0.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.1.9.5\lib\net452\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.0.4\lib\net452\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.1.1-preview-01\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.1.1-preview-01\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<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">
|
||||||
@@ -53,7 +59,12 @@
|
|||||||
<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="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.XML" />
|
<Reference Include="System.XML" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
<?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="net452" />
|
<package id="Handlebars.Net" version="2.0.4" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers" version="2.1.1-preview-01" targetFramework="net452" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Core" version="2.1.1-preview-01" targetFramework="net452" />
|
||||||
|
<package id="log4net" version="2.0.12" 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="11.0.2" 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.3.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -35,11 +35,17 @@
|
|||||||
<StartupObject>WireMock.Net.ConsoleApplication.Program</StartupObject>
|
<StartupObject>WireMock.Net.ConsoleApplication.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.0.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.1.9.5\lib\net452\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.0.4\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.1.1-preview-01\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.1.1-preview-01\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=11.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.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
@@ -48,7 +54,12 @@
|
|||||||
<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="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<?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.0.4" targetFramework="net461" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers" version="2.1.1-preview-01" targetFramework="net461" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Core" version="2.1.1-preview-01" targetFramework="net461" />
|
||||||
|
<package id="log4net" version="2.0.12" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="11.0.2" 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.3.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
54
examples/WireMock.Net.Console.Net472.Classic/App.config
Normal file
54
examples/WireMock.Net.Console.Net472.Classic/App.config
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Security.Cryptography.Cng" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.AspNetCore.Server.IIS" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.2.6.0" newVersion="2.2.6.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("WireMock.Net.Console.Net461.Classic")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("WireMock.Net.Console.Net461.Classic")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © Stef Heyenrath 2018")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("1261bb9b-a7d4-456c-8985-3ce560361b8e")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
@@ -0,0 +1,329 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props" Condition="Exists('..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props')" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{6580580B-1EFD-4922-B0EC-FF290DB279EE}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>WireMock.Net.Console.Net461.Classic</RootNamespace>
|
||||||
|
<AssemblyName>WireMock.Net.Console.Net461.Classic</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject>WireMock.Net.ConsoleApplication.Program</StartupObject>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Fare, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ea68d375bf33a7c8, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Fare.2.1.1\lib\net35\Fare.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Handlebars, Version=2.0.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.2.0.4\lib\net46\Handlebars.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Handlebars.Net.Helpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.1.1-preview-01\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.1.1-preview-01\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Authentication.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Authentication.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Authentication.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Authentication.Core.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Connections.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Diagnostics, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Diagnostics.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Diagnostics.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Diagnostics.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.HostFiltering, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.HostFiltering.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.HostFiltering.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Hosting, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Http, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Http.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Http.Extensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.Extensions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.Features.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.HttpOverrides, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.HttpOverrides.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.HttpOverrides.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Routing, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Routing.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Routing.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Routing.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Routing.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Routing.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.IIS, Version=2.2.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.IIS.2.2.6\lib\netstandard2.0\Microsoft.AspNetCore.Server.IIS.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Core.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Https, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Https.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Https.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNetCore.WebUtilities, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.AspNetCore.WebUtilities.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Binder.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.CommandLine, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.CommandLine.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.CommandLine.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Json.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.2.2.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.FileProviders.Physical.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.Configuration, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Configuration.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Configuration.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.Console, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Console.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Console.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.Debug, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Debug.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Debug.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.EventSource, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.EventSource.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.EventSource.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.ObjectPool, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.ObjectPool.2.2.0\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Options, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Options.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="RandomDataGenerator, Version=1.0.12.0, Culture=neutral, PublicKeyToken=ae5c571d29a3b8d9, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\RandomDataGenerator.Net.1.0.12\lib\net45\RandomDataGenerator.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.ComponentModel.Annotations.4.5.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.0.12.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.0.12\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Security.Cryptography.Cng, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Security.Cryptography.Cng.4.5.0\lib\net47\System.Security.Cryptography.Cng.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Text.Encodings.Web, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.Text.Encodings.Web.4.5.0\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Web" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="XPath2, Version=1.1.0.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\XPath2.1.1.0\lib\net40\XPath2.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="XPath2.Extensions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\XPath2.Extensions.1.1.0\lib\net40\XPath2.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\WireMock.Net.Console.Net452.Classic\CustomFileSystemFileHandler.cs">
|
||||||
|
<Link>CustomFileSystemFileHandler.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\WireMock.Net.Console.Net452.Classic\MainApp.cs">
|
||||||
|
<Link>MainApp.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\WireMock.Net.Console.Net452.Classic\Program.cs">
|
||||||
|
<Link>Program.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\WireMock.Net.Console.Net452.Classic\log4net.config">
|
||||||
|
<Link>log4net.config</Link>
|
||||||
|
</None>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</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" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props'))" />
|
||||||
|
<Error Condition="!Exists('..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets'))" />
|
||||||
|
<Error Condition="!Exists('..\..\packages\Microsoft.AspNetCore.Server.IIS.2.2.6\build\netstandard2.0\Microsoft.AspNetCore.Server.IIS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.AspNetCore.Server.IIS.2.2.6\build\netstandard2.0\Microsoft.AspNetCore.Server.IIS.targets'))" />
|
||||||
|
<Error Condition="!Exists('..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets'))" />
|
||||||
|
</Target>
|
||||||
|
<Import Project="..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets" Condition="Exists('..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" />
|
||||||
|
<Import Project="..\..\packages\Microsoft.AspNetCore.Server.IIS.2.2.6\build\netstandard2.0\Microsoft.AspNetCore.Server.IIS.targets" Condition="Exists('..\..\packages\Microsoft.AspNetCore.Server.IIS.2.2.6\build\netstandard2.0\Microsoft.AspNetCore.Server.IIS.targets')" />
|
||||||
|
<Import Project="..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets" Condition="Exists('..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets')" />
|
||||||
|
</Project>
|
||||||
83
examples/WireMock.Net.Console.Net472.Classic/packages.config
Normal file
83
examples/WireMock.Net.Console.Net472.Classic/packages.config
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Fare" version="2.1.1" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net" version="2.0.4" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers" version="2.1.1-preview-01" targetFramework="net472" />
|
||||||
|
<package id="Handlebars.Net.Helpers.Core" version="2.1.1-preview-01" targetFramework="net472" />
|
||||||
|
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
||||||
|
<package id="log4net" version="2.0.12" targetFramework="net461" />
|
||||||
|
<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.Core" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Connections.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Diagnostics" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Diagnostics.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.HostFiltering" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Hosting" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Http" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Http.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Http.Extensions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Http.Features" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.HttpOverrides" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Routing" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Routing.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.IIS" version="2.2.6" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.IISIntegration" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.Kestrel" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Core" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Https" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.AspNetCore.WebUtilities" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration" version="5.0.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.Abstractions" version="5.0.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.Binder" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.CommandLine" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.Json" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.DependencyInjection" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.FileProviders.Physical" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.FileSystemGlobbing" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Hosting.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging.Configuration" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging.Console" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging.Debug" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging.EventSource" version="2.2.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.ObjectPool" 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.Primitives" version="5.0.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="RandomDataGenerator.Net" version="1.0.12" targetFramework="net472" />
|
||||||
|
<package id="Scriban.Signed" version="2.1.4" targetFramework="net472" />
|
||||||
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
|
<package id="System.Buffers" version="4.5.1" 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.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net472" />
|
||||||
|
<package id="System.IO.Pipelines" version="4.5.3" targetFramework="net472" />
|
||||||
|
<package id="System.Linq.Dynamic.Core" version="1.0.12" 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.Reflection.Metadata" version="1.6.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.Principal.Windows" version="4.5.0" targetFramework="net472" />
|
||||||
|
<package id="System.Text.Encodings.Web" version="4.5.0" 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="WireMock.Net" version="1.4.2" targetFramework="net472" />
|
||||||
|
<package id="WireMock.Net.Abstractions" version="1.4.2" targetFramework="net472" />
|
||||||
|
<package id="XPath2" version="1.1.0" targetFramework="net472" />
|
||||||
|
<package id="XPath2.Extensions" version="1.1.0" targetFramework="net472" />
|
||||||
|
</packages>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?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="net452" />
|
<package id="Handlebars.Net" version="1.9.5" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net452" />
|
<package id="log4net" version="2.0.10" 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" />
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
|||||||
|
|
||||||
_server = WireMockServer.Start(settings);
|
_server = WireMockServer.Start(settings);
|
||||||
|
|
||||||
//_server
|
_server
|
||||||
// .Given(Request.Create()
|
.Given(Request.Create()
|
||||||
// .UsingAnyMethod())
|
.UsingAnyMethod())
|
||||||
// .RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
// .WithProxy("https://www.google.com"));
|
.WithTransformer()
|
||||||
|
.WithBody("{{Random Type=\"Integer\" Min=100 Max=999999}} {{DateTime.Now}} {{DateTime.Now \"yyyy-MMM\"}} {{String.Format (DateTime.Now) \"MMM-dd\"}}"));
|
||||||
|
|
||||||
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="log4net" Version="2.0.8" />
|
<PackageReference Include="log4net" Version="2.0.10" />
|
||||||
</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.8" targetFramework="net452" />
|
<package id="log4net" version="2.0.10" 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="11.0.2" targetFramework="net452" />
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"metadata": {
|
||||||
|
"_dependencyType": "appService.windows"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"resourceGroupName": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "stef-ResourceGroup-WestEuropa",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceGroupLocation": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "westeurope",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceName": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "WireMockNetWebApplicationNETCore3",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Name of the main resource to be created by this template."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resourceLocation": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "[parameters('resourceGroupLocation')]",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
|
||||||
|
"appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Resources/resourceGroups",
|
||||||
|
"name": "[parameters('resourceGroupName')]",
|
||||||
|
"location": "[parameters('resourceGroupLocation')]",
|
||||||
|
"apiVersion": "2019-10-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Resources/deployments",
|
||||||
|
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
|
||||||
|
"resourceGroup": "[parameters('resourceGroupName')]",
|
||||||
|
"apiVersion": "2019-10-01",
|
||||||
|
"dependsOn": [
|
||||||
|
"[parameters('resourceGroupName')]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"mode": "Incremental",
|
||||||
|
"template": {
|
||||||
|
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"location": "[parameters('resourceLocation')]",
|
||||||
|
"name": "[parameters('resourceName')]",
|
||||||
|
"type": "Microsoft.Web/sites",
|
||||||
|
"apiVersion": "2015-08-01",
|
||||||
|
"tags": {
|
||||||
|
"[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
|
||||||
|
},
|
||||||
|
"dependsOn": [
|
||||||
|
"[variables('appServicePlan_ResourceId')]"
|
||||||
|
],
|
||||||
|
"kind": "app",
|
||||||
|
"properties": {
|
||||||
|
"name": "[parameters('resourceName')]",
|
||||||
|
"kind": "app",
|
||||||
|
"httpsOnly": true,
|
||||||
|
"reserved": false,
|
||||||
|
"serverFarmId": "[variables('appServicePlan_ResourceId')]",
|
||||||
|
"siteConfig": {
|
||||||
|
"metadata": [
|
||||||
|
{
|
||||||
|
"name": "CURRENT_STACK",
|
||||||
|
"value": "dotnetcore"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"identity": {
|
||||||
|
"type": "SystemAssigned"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"location": "[parameters('resourceLocation')]",
|
||||||
|
"name": "[variables('appServicePlan_name')]",
|
||||||
|
"type": "Microsoft.Web/serverFarms",
|
||||||
|
"apiVersion": "2015-08-01",
|
||||||
|
"sku": {
|
||||||
|
"name": "S1",
|
||||||
|
"tier": "Standard",
|
||||||
|
"family": "S",
|
||||||
|
"size": "S1"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"name": "[variables('appServicePlan_name')]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,32 +1,29 @@
|
|||||||
<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>
|
||||||
<UserSecretsId>efcf4a18-fd7c-4622-1111-336d65290599</UserSecretsId>
|
<UserSecretsId>efcf4a18-fd7c-4622-1111-336d65290599</UserSecretsId>
|
||||||
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
|
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!--<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />-->
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.8" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.8" />
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<Content Update="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<ItemGroup>
|
</Content>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
</ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Update="appsettings.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -19,7 +19,7 @@ namespace WireMock.Http
|
|||||||
Connection,
|
Connection,
|
||||||
ContentLength,
|
ContentLength,
|
||||||
ContentType,
|
ContentType,
|
||||||
Date,
|
Date, // RFC1123Pattern
|
||||||
Expect,
|
Expect,
|
||||||
Host,
|
Host,
|
||||||
IfModifiedSince,
|
IfModifiedSince,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -150,28 +151,44 @@ namespace WireMock.Owin.Mappers
|
|||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetResponseHeaders(ResponseMessage responseMessage, IResponse response)
|
private static void SetResponseHeaders(ResponseMessage responseMessage, IResponse response)
|
||||||
{
|
{
|
||||||
// Set headers
|
// Force setting the Date header (#577)
|
||||||
foreach (var pair in responseMessage.Headers)
|
AppendResponseHeader(
|
||||||
{
|
response,
|
||||||
if (ResponseHeadersToFix.ContainsKey(pair.Key))
|
HttpKnownHeaderNames.Date,
|
||||||
|
new[]
|
||||||
{
|
{
|
||||||
ResponseHeadersToFix[pair.Key]?.Invoke(response, pair.Value);
|
DateTime.UtcNow.ToString(CultureInfo.InvariantCulture.DateTimeFormat.RFC1123Pattern, CultureInfo.InvariantCulture)
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set other headers
|
||||||
|
foreach (var item in responseMessage.Headers)
|
||||||
|
{
|
||||||
|
var headerName = item.Key;
|
||||||
|
var value = item.Value;
|
||||||
|
if (ResponseHeadersToFix.ContainsKey(headerName))
|
||||||
|
{
|
||||||
|
ResponseHeadersToFix[headerName]?.Invoke(response, value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Check if this response header can be added (#148 and #227)
|
// Check if this response header can be added (#148 and #227)
|
||||||
if (!HttpKnownHeaderNames.IsRestrictedResponseHeader(pair.Key))
|
if (!HttpKnownHeaderNames.IsRestrictedResponseHeader(headerName))
|
||||||
{
|
{
|
||||||
#if !USE_ASPNETCORE
|
AppendResponseHeader(response, headerName, value.ToArray());
|
||||||
response.Headers.AppendValues(pair.Key, pair.Value.ToArray());
|
|
||||||
#else
|
|
||||||
response.Headers.Append(pair.Key, pair.Value.ToArray());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void AppendResponseHeader(IResponse response, string headerName, string[] values)
|
||||||
|
{
|
||||||
|
#if !USE_ASPNETCORE
|
||||||
|
response.Headers.AppendValues(headerName, values);
|
||||||
|
#else
|
||||||
|
response.Headers.Append(headerName, values);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ using WireMock.ResponseBuilders;
|
|||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Proxy
|
namespace WireMock.Proxy
|
||||||
{
|
{
|
||||||
@@ -21,7 +22,7 @@ namespace WireMock.Proxy
|
|||||||
|
|
||||||
public ProxyHelper([NotNull] IWireMockServerSettings settings)
|
public ProxyHelper([NotNull] IWireMockServerSettings settings)
|
||||||
{
|
{
|
||||||
Guard.NotNull(settings, nameof(settings));
|
Check.NotNull(settings, nameof(settings));
|
||||||
_settings = settings;
|
_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,9 +32,9 @@ namespace WireMock.Proxy
|
|||||||
[NotNull] RequestMessage requestMessage,
|
[NotNull] RequestMessage requestMessage,
|
||||||
[NotNull] string url)
|
[NotNull] string url)
|
||||||
{
|
{
|
||||||
Guard.NotNull(client, nameof(client));
|
Check.NotNull(client, nameof(client));
|
||||||
Guard.NotNull(requestMessage, nameof(requestMessage));
|
Check.NotNull(requestMessage, nameof(requestMessage));
|
||||||
Guard.NotNull(url, nameof(url));
|
Check.NotNull(url, nameof(url));
|
||||||
|
|
||||||
var originalUri = new Uri(requestMessage.Url);
|
var originalUri = new Uri(requestMessage.Url);
|
||||||
var requiredUri = new Uri(url);
|
var requiredUri = new Uri(url);
|
||||||
|
|||||||
@@ -261,14 +261,17 @@ namespace WireMock.Server
|
|||||||
proxyUriWithRequestPathAndQuery.AbsoluteUri
|
proxyUriWithRequestPathAndQuery.AbsoluteUri
|
||||||
);
|
);
|
||||||
|
|
||||||
if (settings.ProxyAndRecordSettings.SaveMapping)
|
if (mapping != null)
|
||||||
{
|
{
|
||||||
_options.Mappings.TryAdd(mapping.Guid, mapping);
|
if (settings.ProxyAndRecordSettings.SaveMapping)
|
||||||
}
|
{
|
||||||
|
_options.Mappings.TryAdd(mapping.Guid, mapping);
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.ProxyAndRecordSettings.SaveMappingToFile)
|
if (settings.ProxyAndRecordSettings.SaveMappingToFile)
|
||||||
{
|
{
|
||||||
_mappingToFileSaver.SaveMappingToFile(mapping);
|
_mappingToFileSaver.SaveMappingToFile(mapping);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseMessage;
|
return responseMessage;
|
||||||
|
|||||||
27
src/WireMock.Net/Transformers/Handlebars/FileHelpers.cs
Normal file
27
src/WireMock.Net/Transformers/Handlebars/FileHelpers.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using HandlebarsDotNet;
|
||||||
|
using HandlebarsDotNet.Helpers.Attributes;
|
||||||
|
using HandlebarsDotNet.Helpers.Enums;
|
||||||
|
using HandlebarsDotNet.Helpers.Helpers;
|
||||||
|
using WireMock.Handlers;
|
||||||
|
|
||||||
|
namespace WireMock.Transformers.Handlebars
|
||||||
|
{
|
||||||
|
internal class FileHelpers : BaseHelpers, IHelpers
|
||||||
|
{
|
||||||
|
private readonly IFileSystemHandler _fileSystemHandler;
|
||||||
|
|
||||||
|
public FileHelpers(IHandlebars context, IFileSystemHandler fileSystemHandler) : base(context)
|
||||||
|
{
|
||||||
|
_fileSystemHandler = fileSystemHandler ?? throw new ArgumentNullException(nameof(fileSystemHandler));
|
||||||
|
}
|
||||||
|
|
||||||
|
[HandlebarsWriter(WriterType.String, usage: HelperUsage.Both, passContext: true, name: "File")]
|
||||||
|
public string Read(Context context, string path)
|
||||||
|
{
|
||||||
|
var templateFunc = Context.Compile(path);
|
||||||
|
string transformed = templateFunc(context.Value);
|
||||||
|
return _fileSystemHandler.ReadResponseBodyAsString(transformed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,7 +12,6 @@ namespace WireMock.Transformers.Handlebars
|
|||||||
public string ParseAndRender(string text, object model)
|
public string ParseAndRender(string text, object model)
|
||||||
{
|
{
|
||||||
var template = Handlebars.Compile(text);
|
var template = Handlebars.Compile(text);
|
||||||
|
|
||||||
return template(model);
|
return template(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,6 @@ namespace WireMock.Transformers.Handlebars
|
|||||||
{
|
{
|
||||||
internal class HandlebarsContextFactory : ITransformerContextFactory
|
internal class HandlebarsContextFactory : ITransformerContextFactory
|
||||||
{
|
{
|
||||||
private static readonly HandlebarsConfiguration HandlebarsConfiguration = new HandlebarsConfiguration
|
|
||||||
{
|
|
||||||
UnresolvedBindingFormatter = "{0}"
|
|
||||||
};
|
|
||||||
|
|
||||||
private readonly IFileSystemHandler _fileSystemHandler;
|
private readonly IFileSystemHandler _fileSystemHandler;
|
||||||
private readonly Action<IHandlebars, IFileSystemHandler> _action;
|
private readonly Action<IHandlebars, IFileSystemHandler> _action;
|
||||||
|
|
||||||
@@ -23,7 +18,7 @@ namespace WireMock.Transformers.Handlebars
|
|||||||
|
|
||||||
public ITransformerContext Create()
|
public ITransformerContext Create()
|
||||||
{
|
{
|
||||||
var handlebars = HandlebarsDotNet.Handlebars.Create(HandlebarsConfiguration);
|
var handlebars = HandlebarsDotNet.Handlebars.Create();
|
||||||
|
|
||||||
WireMockHandlebarsHelpers.Register(handlebars, _fileSystemHandler);
|
WireMockHandlebarsHelpers.Register(handlebars, _fileSystemHandler);
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
using HandlebarsDotNet;
|
|
||||||
using System;
|
|
||||||
using WireMock.Handlers;
|
|
||||||
using WireMock.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsFile
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext, IFileSystemHandler fileSystemHandler)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("File", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
string value = ParseArgumentAndReadFileFragment(handlebarsContext, context, fileSystemHandler, arguments);
|
|
||||||
writer.Write(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("File", (writer, options, context, arguments) =>
|
|
||||||
{
|
|
||||||
string value = ParseArgumentAndReadFileFragment(handlebarsContext, context, fileSystemHandler, arguments);
|
|
||||||
options.Template(writer, value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string ParseArgumentAndReadFileFragment(IHandlebars handlebarsContext, dynamic context, IFileSystemHandler fileSystemHandler, object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length == 1, nameof(arguments));
|
|
||||||
Check.NotNull(arguments[0], "arguments[0]");
|
|
||||||
|
|
||||||
switch (arguments[0])
|
|
||||||
{
|
|
||||||
case string path:
|
|
||||||
var templateFunc = handlebarsContext.Compile(path);
|
|
||||||
string transformed = templateFunc(context);
|
|
||||||
return fileSystemHandler.ReadResponseBodyAsString(transformed);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new NotSupportedException($"The value '{arguments[0]}' with type '{arguments[0]?.GetType()}' cannot be used in Handlebars File.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
using HandlebarsDotNet;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Linq;
|
|
||||||
using WireMock.Util;
|
|
||||||
using WireMock.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsJsonPath
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("JsonPath.SelectToken", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
(JToken valueToProcess, string jsonPath) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var result = valueToProcess.SelectToken(jsonPath);
|
|
||||||
writer.WriteSafeString(result);
|
|
||||||
}
|
|
||||||
catch (JsonException)
|
|
||||||
{
|
|
||||||
// Ignore JsonException
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("JsonPath.SelectTokens", (writer, options, context, arguments) =>
|
|
||||||
{
|
|
||||||
(JToken valueToProcess, string jsonPath) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var values = valueToProcess.SelectTokens(jsonPath);
|
|
||||||
if (values != null)
|
|
||||||
{
|
|
||||||
options.Template(writer, values.ToDictionary(value => value.Path, value => value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (JsonException)
|
|
||||||
{
|
|
||||||
// Ignore JsonException
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static (JToken valueToProcess, string jsonpath) ParseArguments(object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length == 2, nameof(arguments));
|
|
||||||
Check.NotNull(arguments[0], "arguments[0]");
|
|
||||||
Check.NotNullOrEmpty(arguments[1] as string, "arguments[1]");
|
|
||||||
|
|
||||||
JToken valueToProcess;
|
|
||||||
|
|
||||||
switch (arguments[0])
|
|
||||||
{
|
|
||||||
case JToken tokenValue:
|
|
||||||
valueToProcess = tokenValue;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case string stringValue:
|
|
||||||
valueToProcess = JsonUtils.Parse(stringValue);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IEnumerable enumerableValue:
|
|
||||||
valueToProcess = JArray.FromObject(enumerableValue);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new NotSupportedException($"The value '{arguments[0]}' with type '{arguments[0]?.GetType()}' cannot be used in Handlebars JsonPath.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (valueToProcess, (string)arguments[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Linq.Dynamic.Core;
|
|
||||||
using System.Linq.Dynamic.Core.Exceptions;
|
|
||||||
using HandlebarsDotNet;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using WireMock.Util;
|
|
||||||
using WireMock.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsLinq
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("Linq", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
(JToken valueToProcess, string linqStatement) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
object result = ExecuteDynamicLinq(valueToProcess, linqStatement);
|
|
||||||
writer.WriteSafeString(result);
|
|
||||||
}
|
|
||||||
catch (ParseException)
|
|
||||||
{
|
|
||||||
// Ignore ParseException
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("Linq", (writer, options, context, arguments) =>
|
|
||||||
{
|
|
||||||
(JToken valueToProcess, string linqStatement) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var result = ExecuteDynamicLinq(valueToProcess, linqStatement);
|
|
||||||
options.Template(writer, result);
|
|
||||||
}
|
|
||||||
catch (ParseException)
|
|
||||||
{
|
|
||||||
// Ignore ParseException
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static dynamic ExecuteDynamicLinq(JToken value, string linqStatement)
|
|
||||||
{
|
|
||||||
// Convert a single object to a Queryable JObject-list with 1 entry.
|
|
||||||
var queryable1 = new[] { value }.AsQueryable();
|
|
||||||
|
|
||||||
// Generate the DynamicLinq select statement.
|
|
||||||
string dynamicSelect = JsonUtils.GenerateDynamicLinqStatement(value);
|
|
||||||
|
|
||||||
// Execute DynamicLinq Select statement.
|
|
||||||
var queryable2 = queryable1.Select(dynamicSelect);
|
|
||||||
|
|
||||||
// Execute the Select(...) method and get first result with FirstOrDefault().
|
|
||||||
return queryable2.Select(linqStatement).FirstOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static (JToken valueToProcess, string linqStatement) ParseArguments(object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length == 2, nameof(arguments));
|
|
||||||
Check.NotNull(arguments[0], "arguments[0]");
|
|
||||||
Check.NotNullOrEmpty(arguments[1] as string, "arguments[1]");
|
|
||||||
|
|
||||||
JToken valueToProcess;
|
|
||||||
switch (arguments[0])
|
|
||||||
{
|
|
||||||
case string jsonAsString:
|
|
||||||
valueToProcess = new JValue(jsonAsString);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case JToken jsonAsJObject:
|
|
||||||
valueToProcess = jsonAsJObject;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new NotSupportedException($"The value '{arguments[0]}' with type '{arguments[0]?.GetType()}' cannot be used in Handlebars Linq.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (valueToProcess, (string) arguments[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
|
||||||
using HandlebarsDotNet;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using RandomDataGenerator.FieldOptions;
|
|
||||||
using RandomDataGenerator.Randomizers;
|
|
||||||
using WireMock.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsRandom
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("Random", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
object value = GetRandomValue(arguments);
|
|
||||||
writer.Write(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("Random", (writer, options, context, arguments) =>
|
|
||||||
{
|
|
||||||
object value = GetRandomValue(arguments);
|
|
||||||
options.Template(writer, value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static object GetRandomValue(object[] arguments)
|
|
||||||
{
|
|
||||||
var fieldOptions = GetFieldOptionsFromArguments(arguments);
|
|
||||||
dynamic randomizer = RandomizerFactory.GetRandomizerAsDynamic(fieldOptions);
|
|
||||||
|
|
||||||
// Format DateTime as ISO 8601
|
|
||||||
if (fieldOptions is IFieldOptionsDateTime)
|
|
||||||
{
|
|
||||||
DateTime? date = randomizer.Generate();
|
|
||||||
return date?.ToString("s", CultureInfo.InvariantCulture);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the IFieldOptionsGuid defines Uppercase, use the 'GenerateAsString' method.
|
|
||||||
if (fieldOptions is IFieldOptionsGuid fieldOptionsGuid)
|
|
||||||
{
|
|
||||||
return fieldOptionsGuid.Uppercase ? randomizer.GenerateAsString() : randomizer.Generate();
|
|
||||||
}
|
|
||||||
|
|
||||||
return randomizer.Generate();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static FieldOptionsAbstract GetFieldOptionsFromArguments(object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length > 0, nameof(arguments));
|
|
||||||
Check.NotNull(arguments[0], "arguments[0]");
|
|
||||||
|
|
||||||
var properties = (Dictionary<string, object>)arguments[0];
|
|
||||||
var newProperties = new Dictionary<string, object>();
|
|
||||||
|
|
||||||
foreach (KeyValuePair<string, object> property in properties.Where(p => p.Key != "Type"))
|
|
||||||
{
|
|
||||||
if (property.Value.GetType().Name == "UndefinedBindingResult")
|
|
||||||
{
|
|
||||||
if (TryParseSpecialValue(property.Value, out object parsedValue))
|
|
||||||
{
|
|
||||||
newProperties.Add(property.Key, parsedValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newProperties.Add(property.Key, property.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return FieldOptionsFactory.GetFieldOptions((string)properties["Type"], newProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// In case it's an UndefinedBindingResult, just try to convert the value using Json
|
|
||||||
/// This logic adds functionality like parsing an array
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="value">The property value</param>
|
|
||||||
/// <param name="parsedValue">The parsed value</param>
|
|
||||||
/// <returns>true in case parsing is ok, else false</returns>
|
|
||||||
private static bool TryParseSpecialValue(object value, out object parsedValue)
|
|
||||||
{
|
|
||||||
parsedValue = null;
|
|
||||||
string propertyValueAsString = value.ToString();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
JToken jToken = JToken.Parse(propertyValueAsString);
|
|
||||||
switch (jToken)
|
|
||||||
{
|
|
||||||
case JArray jTokenArray:
|
|
||||||
parsedValue = jTokenArray.ToObject<string[]>().ToList(); // Just convert to a String List to enable Random StringList
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return jToken.ToObject<dynamic>();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (JsonException)
|
|
||||||
{
|
|
||||||
// Ignore and don't add this value
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using HandlebarsDotNet;
|
|
||||||
using WireMock.Util;
|
|
||||||
using WireMock.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsRegex
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("Regex.Match", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
(string stringToProcess, string regexPattern, object defaultValue) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
Match match = Regex.Match(stringToProcess, regexPattern);
|
|
||||||
|
|
||||||
if (match.Success)
|
|
||||||
{
|
|
||||||
writer.WriteSafeString(match.Value);
|
|
||||||
}
|
|
||||||
else if (defaultValue != null)
|
|
||||||
{
|
|
||||||
writer.WriteSafeString(defaultValue);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("Regex.Match", (writer, options, context, arguments) =>
|
|
||||||
{
|
|
||||||
(string stringToProcess, string regexPattern, object defaultValue) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
var regex = new Regex(regexPattern);
|
|
||||||
var namedGroups = RegexUtils.GetNamedGroups(regex, stringToProcess);
|
|
||||||
if (namedGroups.Any())
|
|
||||||
{
|
|
||||||
options.Template(writer, namedGroups);
|
|
||||||
}
|
|
||||||
else if (defaultValue != null)
|
|
||||||
{
|
|
||||||
options.Template(writer, defaultValue);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static (string stringToProcess, string regexPattern, object defaultValue) ParseArguments(object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length == 2 || args.Length == 3, nameof(arguments));
|
|
||||||
|
|
||||||
string ParseAsString(object arg)
|
|
||||||
{
|
|
||||||
if (arg is string argAsString)
|
|
||||||
{
|
|
||||||
return argAsString;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new NotSupportedException($"The value '{arg}' with type '{arg?.GetType()}' cannot be used in Handlebars Regex.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (ParseAsString(arguments[0]), ParseAsString(arguments[1]), arguments.Length == 3 ? arguments[2] : null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
using HandlebarsDotNet;
|
|
||||||
using System;
|
|
||||||
using System.Text;
|
|
||||||
using System.Xml;
|
|
||||||
using System.Xml.XPath;
|
|
||||||
using WireMock.Validation;
|
|
||||||
#if !NETSTANDARD1_3
|
|
||||||
using Wmhelp.XPath2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsXPath
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("XPath.SelectSingleNode", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
(XPathNavigator nav, string xpath) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
#if NETSTANDARD1_3
|
|
||||||
var result = nav.SelectSingleNode(xpath);
|
|
||||||
#else
|
|
||||||
var result = nav.XPath2SelectSingleNode(xpath);
|
|
||||||
#endif
|
|
||||||
writer.WriteSafeString(result.OuterXml);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
// Ignore Exception
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("XPath.SelectNodes", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
(XPathNavigator nav, string xpath) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
#if NETSTANDARD1_3
|
|
||||||
var result = nav.Select(xpath);
|
|
||||||
#else
|
|
||||||
var result = nav.XPath2SelectNodes(xpath);
|
|
||||||
#endif
|
|
||||||
var resultXml = new StringBuilder();
|
|
||||||
foreach (XPathNavigator node in result)
|
|
||||||
{
|
|
||||||
resultXml.Append(node.OuterXml);
|
|
||||||
}
|
|
||||||
|
|
||||||
writer.WriteSafeString(resultXml);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
// Ignore Exception
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("XPath.Evaluate", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
(XPathNavigator nav, string xpath) = ParseArguments(arguments);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
#if NETSTANDARD1_3
|
|
||||||
var result = nav.Evaluate(xpath);
|
|
||||||
#else
|
|
||||||
var result = nav.XPath2Evaluate(xpath);
|
|
||||||
#endif
|
|
||||||
writer.WriteSafeString(result);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
// Ignore Exception
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static (XPathNavigator nav, string xpath) ParseArguments(object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length == 2, nameof(arguments));
|
|
||||||
Check.NotNull(arguments[0], "arguments[0]");
|
|
||||||
Check.NotNullOrEmpty(arguments[1] as string, "arguments[1]");
|
|
||||||
|
|
||||||
XPathNavigator nav;
|
|
||||||
|
|
||||||
switch (arguments[0])
|
|
||||||
{
|
|
||||||
case string stringValue:
|
|
||||||
nav = new XmlDocument { InnerXml = stringValue }.CreateNavigator();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new NotSupportedException($"The value '{arguments[0]}' with type '{arguments[0]?.GetType()}' cannot be used in Handlebars XPath.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (nav, (string)arguments[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Fare;
|
|
||||||
using HandlebarsDotNet;
|
|
||||||
using WireMock.Validation;
|
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
|
||||||
{
|
|
||||||
internal static class HandlebarsXeger
|
|
||||||
{
|
|
||||||
public static void Register(IHandlebars handlebarsContext)
|
|
||||||
{
|
|
||||||
handlebarsContext.RegisterHelper("Xeger", (writer, context, arguments) =>
|
|
||||||
{
|
|
||||||
string value = ParseArgumentAndGenerate(arguments);
|
|
||||||
writer.Write(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
handlebarsContext.RegisterHelper("Xeger", (writer, options, context, arguments) =>
|
|
||||||
{
|
|
||||||
string value = ParseArgumentAndGenerate(arguments);
|
|
||||||
options.Template(writer, value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string ParseArgumentAndGenerate(object[] arguments)
|
|
||||||
{
|
|
||||||
Check.Condition(arguments, args => args.Length == 1, nameof(arguments));
|
|
||||||
Check.NotNull(arguments[0], "arguments[0]");
|
|
||||||
|
|
||||||
switch (arguments[0])
|
|
||||||
{
|
|
||||||
case string pattern:
|
|
||||||
return new Xeger(pattern).Generate();
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new NotSupportedException($"The value '{arguments[0]}' with type '{arguments[0]?.GetType()}' cannot be used in Handlebars Xeger.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
using HandlebarsDotNet;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using HandlebarsDotNet;
|
||||||
using HandlebarsDotNet.Helpers;
|
using HandlebarsDotNet.Helpers;
|
||||||
|
using HandlebarsDotNet.Helpers.Helpers;
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars
|
namespace WireMock.Transformers.Handlebars
|
||||||
@@ -9,22 +14,23 @@ namespace WireMock.Transformers.Handlebars
|
|||||||
public static void Register(IHandlebars handlebarsContext, IFileSystemHandler fileSystemHandler)
|
public static void Register(IHandlebars handlebarsContext, IFileSystemHandler fileSystemHandler)
|
||||||
{
|
{
|
||||||
// Register https://github.com/StefH/Handlebars.Net.Helpers
|
// Register https://github.com/StefH/Handlebars.Net.Helpers
|
||||||
HandlebarsHelpers.Register(handlebarsContext);
|
HandlebarsHelpers.Register(handlebarsContext, o =>
|
||||||
|
{
|
||||||
|
o.CustomHelperPaths = new string[]
|
||||||
|
{
|
||||||
|
Directory.GetCurrentDirectory()
|
||||||
|
#if !NETSTANDARD1_3
|
||||||
|
, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
.Distinct()
|
||||||
|
.ToList();
|
||||||
|
|
||||||
// Register WireMock.Net specific helpers
|
o.CustomHelpers = new Dictionary<string, IHelpers>
|
||||||
HandlebarsRegex.Register(handlebarsContext);
|
{
|
||||||
|
{ "File", new FileHelpers(handlebarsContext, fileSystemHandler) }
|
||||||
HandlebarsJsonPath.Register(handlebarsContext);
|
};
|
||||||
|
});
|
||||||
HandlebarsLinq.Register(handlebarsContext);
|
|
||||||
|
|
||||||
HandlebarsRandom.Register(handlebarsContext);
|
|
||||||
|
|
||||||
HandlebarsXeger.Register(handlebarsContext);
|
|
||||||
|
|
||||||
HandlebarsXPath.Register(handlebarsContext);
|
|
||||||
|
|
||||||
HandlebarsFile.Register(handlebarsContext, fileSystemHandler);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ namespace WireMock.Transformers.Handlebars
|
|||||||
|
|
||||||
private static JToken ReplaceSingleNode(ITransformerContext handlebarsContext, string stringValue, object model)
|
private static JToken ReplaceSingleNode(ITransformerContext handlebarsContext, string stringValue, object model)
|
||||||
{
|
{
|
||||||
string transformedString = handlebarsContext.ParseAndRender(stringValue, model);
|
string transformedString = handlebarsContext.ParseAndRender(stringValue, model) as string;
|
||||||
|
|
||||||
if (!string.Equals(stringValue, transformedString))
|
if (!string.Equals(stringValue, transformedString))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,13 +50,7 @@
|
|||||||
<DefineConstants>USE_ASPNETCORE;NET46</DefineConstants>
|
<DefineConstants>USE_ASPNETCORE;NET46</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Transformers\Scriban\ScribanTransformer.cs" />
|
|
||||||
<Compile Remove="Transformers\Scriban\WireMockListAccessor.cs" />
|
|
||||||
<Compile Remove="Transformers\Scriban\WireMockTemplateContext.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
@@ -64,8 +58,6 @@
|
|||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.12" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.12" />
|
||||||
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.12" />
|
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.12" />
|
||||||
<PackageReference Include="JmesPath.Net" Version="1.0.125" />
|
<PackageReference Include="JmesPath.Net" Version="1.0.125" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="1.1.0" />
|
|
||||||
<!--<PackageReference Include="DotLiquid" Version="2.0.366" />-->
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(Configuration)' == 'Debug - Sonar'">
|
<ItemGroup Condition="'$(Configuration)' == 'Debug - Sonar'">
|
||||||
@@ -129,6 +121,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.1.1" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.1.1" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.1.1" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.1.1" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.1.1" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.1.1" />
|
||||||
|
|
||||||
<ProjectReference Include="..\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
<ProjectReference Include="..\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -108,23 +108,6 @@ namespace WireMock.Net.Tests.Owin.Mappers
|
|||||||
_responseMock.VerifySet(r => r.StatusCode = expected, Times.Once);
|
_responseMock.VerifySet(r => r.StatusCode = expected, Times.Once);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task OwinResponseMapper_MapAsync_Null_StatusCode_When_AllowOnlyDefinedHttpStatusCodeInResponseSet_Is_True()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
_optionsMock.SetupGet(o => o.AllowOnlyDefinedHttpStatusCodeInResponse).Returns(true);
|
|
||||||
var responseMessage = new ResponseMessage
|
|
||||||
{
|
|
||||||
StatusCode = null
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
await _sut.MapAsync(responseMessage, _responseMock.Object);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
_responseMock.VerifyNoOtherCalls();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task OwinResponseMapper_MapAsync_StatusCode_Is_Null()
|
public async Task OwinResponseMapper_MapAsync_StatusCode_Is_Null()
|
||||||
{
|
{
|
||||||
@@ -138,7 +121,7 @@ namespace WireMock.Net.Tests.Owin.Mappers
|
|||||||
await _sut.MapAsync(responseMessage, _responseMock.Object);
|
await _sut.MapAsync(responseMessage, _responseMock.Object);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
_responseMock.VerifyNoOtherCalls();
|
_responseMock.VerifySet(r => r.StatusCode = It.IsAny<int>(), Times.Never);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using HandlebarsDotNet;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NFluent;
|
using NFluent;
|
||||||
@@ -76,7 +77,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Response_ProvideResponseAsync_Handlebars_File_WithMissingArgument_ThrowsArgumentOutOfRangeException()
|
public void Response_ProvideResponseAsync_Handlebars_File_WithMissingArgument_Throws_HandlebarsException()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost:1234"), "GET", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost:1234"), "GET", ClientIp);
|
||||||
@@ -89,7 +90,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<ArgumentOutOfRangeException>();
|
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<HandlebarsException>();
|
||||||
|
|
||||||
// Verify
|
// Verify
|
||||||
_filesystemHandlerMock.Verify(fs => fs.ReadResponseBodyAsString(It.IsAny<string>()), Times.Never);
|
_filesystemHandlerMock.Verify(fs => fs.ReadResponseBodyAsString(It.IsAny<string>()), Times.Never);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using FluentAssertions;
|
||||||
|
using HandlebarsDotNet;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NFluent;
|
using NFluent;
|
||||||
@@ -139,7 +141,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Response_ProvideResponse_Handlebars_Linq_Throws_NotSupportedException()
|
public void Response_ProvideResponse_Handlebars_Linq_Throws_ArgumentException()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
var body = new BodyData
|
var body = new BodyData
|
||||||
@@ -155,7 +157,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<NotSupportedException>();
|
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<ArgumentException>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -175,7 +177,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Response_ProvideResponse_Handlebars_Linq1_Throws_ArgumentException()
|
public void Response_ProvideResponse_Handlebars_Linq1_Throws_HandlebarsException()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
var body = new BodyData();
|
var body = new BodyData();
|
||||||
@@ -187,11 +189,11 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<ArgumentException>();
|
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<HandlebarsException>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async void Response_ProvideResponse_Handlebars_Linq1_ParseError_Returns_Empty()
|
public void Response_ProvideResponse_Handlebars_Linq1_ParseError_Throws_ExceptionMessage()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
var body = new BodyData
|
var body = new BodyData
|
||||||
@@ -211,15 +213,14 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var responseMessage = await response.ProvideResponseAsync(request, _settings);
|
Func<Task> a = async () => await response.ProvideResponseAsync(request, _settings);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JObject j = JObject.FromObject(responseMessage.BodyData.BodyAsJson);
|
a.Should().Throw<HandlebarsException>();
|
||||||
Check.That(j["x"].ToString()).IsEmpty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async void Response_ProvideResponse_Handlebars_Linq2_ParseError_Returns_Empty()
|
public void Response_ProvideResponse_Handlebars_Linq2_ParseError_Throws_ExceptionMessage()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
var body = new BodyData
|
var body = new BodyData
|
||||||
@@ -239,11 +240,10 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var responseMessage = await response.ProvideResponseAsync(request, _settings);
|
Func<Task> a = async () => await response.ProvideResponseAsync(request, _settings);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JObject j = JObject.FromObject(responseMessage.BodyData.BodyAsJson);
|
a.Should().Throw<HandlebarsException>();
|
||||||
Check.That(j["x"].ToString()).IsEmpty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
var request = new RequestMessage(new UrlDetails("http://localhost:1234"), "POST", ClientIp, body);
|
var request = new RequestMessage(new UrlDetails("http://localhost:1234"), "POST", ClientIp, body);
|
||||||
|
|
||||||
var response = Response.Create()
|
var response = Response.Create()
|
||||||
.WithBody("{{Regex.Match request.body \"^(?<x>\\w+)$\"}}")
|
.WithBody("{{Regex.Match request.body \"^(\\w+)$\"}}")
|
||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
@@ -154,7 +154,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<NotSupportedException>();
|
Check.ThatAsyncCode(() => response.ProvideResponseAsync(request, _settings)).Throws<ArgumentNullException>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,8 +34,8 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
var response = Response.Create()
|
var response = Response.Create()
|
||||||
.WithBodyAsJson(new
|
.WithBodyAsJson(new
|
||||||
{
|
{
|
||||||
Number = "{{Xeger \"[1-9]{1}\\d{3}\"}}",
|
Number = "{{Xeger.Generate \"[1-9]{1}\\d{3}\"}}",
|
||||||
Postcode = "{{Xeger \"[1-9][0-9]{3}[A-Z]{2}\"}}"
|
Postcode = "{{Xeger.Generate \"[1-9][0-9]{3}[A-Z]{2}\"}}"
|
||||||
})
|
})
|
||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
var response = Response.Create()
|
var response = Response.Create()
|
||||||
.WithBodyAsJson(new
|
.WithBodyAsJson(new
|
||||||
{
|
{
|
||||||
Number = "{{#Xeger \"[1-9]{1}\\d{3}\"}}{{this}}{{/Xeger}}",
|
Number = "{{#Xeger.Generate \"[1-9]{1}\\d{3}\"}}{{this}}{{/Xeger.Generate}}",
|
||||||
Postcode = "{{#Xeger \"[1-9][0-9]{3}[A-Z]{2}\"}}{{this}}{{/Xeger}}"
|
Postcode = "{{#Xeger.Generate \"[1-9][0-9]{3}[A-Z]{2}\"}}{{this}}{{/Xeger.Generate}}"
|
||||||
})
|
})
|
||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
var responseMessage = await response.ProvideResponseAsync(request, _settings);
|
var responseMessage = await response.ProvideResponseAsync(request, _settings);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(responseMessage.BodyData.BodyAsString).Equals("test keya=1 idx=1 idx=2 keyb=5");
|
Check.That(responseMessage.BodyData.BodyAsString).Equals("test keya=1,2 idx=1 idx=2 keyb=5");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory(Skip = "Invalid token `OpenBracket`")]
|
[Theory(Skip = "Invalid token `OpenBracket`")]
|
||||||
@@ -503,7 +503,7 @@ namespace WireMock.Net.Tests.ResponseBuilders
|
|||||||
Check.That(JsonConvert.SerializeObject(responseMessage.BodyData.BodyAsJson)).Equals("\"test\"");
|
Check.That(JsonConvert.SerializeObject(responseMessage.BodyData.BodyAsJson)).Equals("\"test\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact(Skip = "todo...")]
|
||||||
public async Task Response_ProvideResponse_Handlebars_WithBodyAsJson_ResultAsTemplatedString()
|
public async Task Response_ProvideResponse_Handlebars_WithBodyAsJson_ResultAsTemplatedString()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
|
|||||||
@@ -33,29 +33,29 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Codecov" Version="1.10.0" />
|
<PackageReference Include="Codecov" Version="1.10.0" />
|
||||||
<PackageReference Include="coverlet.msbuild" Version="3.0.0-preview.9">
|
<PackageReference Include="coverlet.msbuild" Version="3.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="coverlet.collector" Version="3.0.0-preview.9">
|
<PackageReference Include="coverlet.collector" Version="3.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
||||||
<PackageReference Include="FluentAssertions" Version="5.10.3" />
|
<PackageReference Include="FluentAssertions" Version="5.10.3" />
|
||||||
<PackageReference Include="Moq" Version="4.13.1" />
|
<PackageReference Include="Moq" Version="4.16.0" />
|
||||||
<PackageReference Include="System.Threading" Version="4.3.0" />
|
<PackageReference Include="System.Threading" Version="4.3.0" />
|
||||||
<PackageReference Include="RestEase" Version="1.4.10" />
|
<PackageReference Include="RestEase" Version="1.4.10" />
|
||||||
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.12" />
|
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.12" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<PackageReference Include="NFluent" Version="2.7.0" />
|
<PackageReference Include="NFluent" Version="2.7.1" />
|
||||||
<!--<PackageReference Include="OpenCover" Version="4.7.922" />-->
|
<!--<PackageReference Include="OpenCover" Version="4.7.922" />-->
|
||||||
<!--<PackageReference Include="ReportGenerator" Version="4.8.1" />-->
|
<!--<PackageReference Include="ReportGenerator" Version="4.8.1" />-->
|
||||||
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
||||||
|
|||||||
@@ -116,6 +116,42 @@ namespace WireMock.Net.Tests
|
|||||||
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WireMockServer_Proxy_With_SaveMappingForStatusCodePattern_Is_False_Should_Not_SaveMapping()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var fileSystemHandlerMock = new Mock<IFileSystemHandler>();
|
||||||
|
fileSystemHandlerMock.Setup(f => f.GetMappingFolder()).Returns("m");
|
||||||
|
|
||||||
|
var settings = new WireMockServerSettings
|
||||||
|
{
|
||||||
|
ProxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
|
{
|
||||||
|
Url = "http://www.google.com",
|
||||||
|
SaveMapping = true,
|
||||||
|
SaveMappingToFile = true,
|
||||||
|
SaveMappingForStatusCodePattern = "999" // Just make sure that we don't want this mapping
|
||||||
|
},
|
||||||
|
FileSystemHandler = fileSystemHandlerMock.Object
|
||||||
|
};
|
||||||
|
var server = WireMockServer.Start(settings);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var requestMessage = new HttpRequestMessage
|
||||||
|
{
|
||||||
|
Method = HttpMethod.Get,
|
||||||
|
RequestUri = new Uri(server.Urls[0])
|
||||||
|
};
|
||||||
|
var httpClientHandler = new HttpClientHandler { AllowAutoRedirect = false };
|
||||||
|
await new HttpClient(httpClientHandler).SendAsync(requestMessage);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
server.Mappings.Should().HaveCount(1);
|
||||||
|
|
||||||
|
// Verify
|
||||||
|
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task WireMockServer_Proxy_Should_log_proxied_requests()
|
public async Task WireMockServer_Proxy_Should_log_proxied_requests()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user