mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-15 19:36:57 +02:00
Compare commits
1 Commits
1.5.13
...
stef-847-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04cba25bdf |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,22 +1,3 @@
|
|||||||
# 1.5.13 (11 December 2022)
|
|
||||||
- [#858](https://github.com/WireMock-Net/WireMock.Net/pull/858) - Update Transformer functionality to return value instead of string [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#859](https://github.com/WireMock-Net/WireMock.Net/pull/859) - Add UpdatedAt property to Mapping [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#861](https://github.com/WireMock-Net/WireMock.Net/pull/861) - Add extra functionality for issue 55 contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#862](https://github.com/WireMock-Net/WireMock.Net/pull/862) - Add client certificate support [feature] contributed by [billybraga](https://github.com/billybraga)
|
|
||||||
- [#863](https://github.com/WireMock-Net/WireMock.Net/pull/863) - Update WireMockServer.CreateClient/CreateClients to include handlers [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#856](https://github.com/WireMock-Net/WireMock.Net/issues/856) - Inconsistent result with overlapping (duplicate) request [bug]
|
|
||||||
|
|
||||||
# 1.5.12 (03 December 2022)
|
|
||||||
- [#851](https://github.com/WireMock-Net/WireMock.Net/pull/851) - Fix Linux CI build + Fix opencover [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#853](https://github.com/WireMock-Net/WireMock.Net/pull/853) - Add .Net 7 [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#854](https://github.com/WireMock-Net/WireMock.Net/pull/854) - Fix logic for QueryParameterMultipleValueSupport [bug] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#857](https://github.com/WireMock-Net/WireMock.Net/pull/857) - Update some dependencies [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
|
|
||||||
# 1.5.11 (24 November 2022)
|
|
||||||
- [#836](https://github.com/WireMock-Net/WireMock.Net/pull/836) - Add Settings.QueryParameterMultipleValueSupport [feature] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#848](https://github.com/WireMock-Net/WireMock.Net/pull/848) - Use try-catch when adding or removing logEntry [bug] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#846](https://github.com/WireMock-Net/WireMock.Net/issues/846) - Exception ArgumentOutOfRangeException [bug]
|
|
||||||
|
|
||||||
# 1.5.10 (06 November 2022)
|
# 1.5.10 (06 November 2022)
|
||||||
- [#843](https://github.com/WireMock-Net/WireMock.Net/pull/843) - Webhook Templating: Use the transformed URL to create the HttpRequestMessage contributed by [ggradnig](https://github.com/ggradnig)
|
- [#843](https://github.com/WireMock-Net/WireMock.Net/pull/843) - Webhook Templating: Use the transformed URL to create the HttpRequestMessage contributed by [ggradnig](https://github.com/ggradnig)
|
||||||
- [#845](https://github.com/WireMock-Net/WireMock.Net/pull/845) - Add WireMockNullLogger as valid commandline logger option [feature] contributed by [StefH](https://github.com/StefH)
|
- [#845](https://github.com/WireMock-Net/WireMock.Net/pull/845) - Add WireMockNullLogger as valid commandline logger option [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
@@ -923,7 +904,6 @@
|
|||||||
- [#45](https://github.com/WireMock-Net/WireMock.Net/pull/45) - Add RequestLogExpirationDuration and MaxRequestLogCount (#43) contributed by [StefH](https://github.com/StefH)
|
- [#45](https://github.com/WireMock-Net/WireMock.Net/pull/45) - Add RequestLogExpirationDuration and MaxRequestLogCount (#43) contributed by [StefH](https://github.com/StefH)
|
||||||
- [#51](https://github.com/WireMock-Net/WireMock.Net/pull/51) - Observable logs contributed by [dmtrrk](https://github.com/dmtrrk)
|
- [#51](https://github.com/WireMock-Net/WireMock.Net/pull/51) - Observable logs contributed by [dmtrrk](https://github.com/dmtrrk)
|
||||||
- [#15](https://github.com/WireMock-Net/WireMock.Net/issues/15) - New feature: Proxying [feature]
|
- [#15](https://github.com/WireMock-Net/WireMock.Net/issues/15) - New feature: Proxying [feature]
|
||||||
- [#20](https://github.com/WireMock-Net/WireMock.Net/issues/20) - Add client certificate authentication [feature]
|
|
||||||
- [#31](https://github.com/WireMock-Net/WireMock.Net/issues/31) - Feature request: Nuget package for standalone version [feature]
|
- [#31](https://github.com/WireMock-Net/WireMock.Net/issues/31) - Feature request: Nuget package for standalone version [feature]
|
||||||
- [#33](https://github.com/WireMock-Net/WireMock.Net/issues/33) - Issue with launching sample code (StandAlone server) [bug]
|
- [#33](https://github.com/WireMock-Net/WireMock.Net/issues/33) - Issue with launching sample code (StandAlone server) [bug]
|
||||||
- [#38](https://github.com/WireMock-Net/WireMock.Net/issues/38) - Bug: support also listening on *:{port}
|
- [#38](https://github.com/WireMock-Net/WireMock.Net/issues/38) - Bug: support also listening on *:{port}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.5.13</VersionPrefix>
|
<VersionPrefix>1.5.10</VersionPrefix>
|
||||||
<PackageIcon>WireMock.Net-Logo.png</PackageIcon>
|
<PackageIcon>WireMock.Net-Logo.png</PackageIcon>
|
||||||
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
||||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||||
@@ -20,13 +20,6 @@
|
|||||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- https://github.com/coverlet-coverage/coverlet/issues/1391 -->
|
|
||||||
<PropertyGroup Condition="$(MSBuildProjectName.Contains('.Tests'))">
|
|
||||||
<CollectCoverage>true</CollectCoverage>
|
|
||||||
<ExcludeByAttribute>GeneratedCodeAttribute</ExcludeByAttribute>
|
|
||||||
<CoverletOutputFormat>opencover</CoverletOutputFormat>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="../../resources/WireMock.Net-Logo.png" Pack="true" PackagePath="" />
|
<None Include="../../resources/WireMock.Net-Logo.png" Pack="true" PackagePath="" />
|
||||||
<!--<None Include="../../PackageReadme.md" Pack="true" PackagePath=""/>-->
|
<!--<None Include="../../PackageReadme.md" Pack="true" PackagePath=""/>-->
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
rem https://github.com/StefH/GitHubReleaseNotes
|
rem https://github.com/StefH/GitHubReleaseNotes
|
||||||
|
|
||||||
SET version=1.5.13
|
SET version=1.5.10
|
||||||
|
|
||||||
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc duplicate --version %version% --token %GH_TOKEN%
|
GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc duplicate --version %version% --token %GH_TOKEN%
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
# 1.5.13 (11 December 2022)
|
# 1.5.10 (06 November 2022)
|
||||||
- #858 Update Transformer functionality to return value instead of string [feature]
|
- #843 Webhook Templating: Use the transformed URL to create the HttpRequestMessage
|
||||||
- #859 Add UpdatedAt property to Mapping [feature]
|
- #845 Add WireMockNullLogger as valid commandline logger option [feature]
|
||||||
- #861 Add extra functionality for issue 55
|
|
||||||
- #862 Add client certificate support [feature]
|
|
||||||
- #863 Update WireMockServer.CreateClient/CreateClients to include handlers [feature]
|
|
||||||
- #856 Inconsistent result with overlapping (duplicate) request [bug]
|
|
||||||
|
|
||||||
The full release notes can be found here: https://github.com/WireMock-Net/WireMock.Net/blob/master/CHANGELOG.md
|
The full release notes can be found here: https://github.com/WireMock-Net/WireMock.Net/blob/master/CHANGELOG.md
|
||||||
@@ -33,7 +33,6 @@
|
|||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Scriban/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Scriban/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sigil/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sigil/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stef/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stef/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=templated/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Victoor/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Victoor/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhook/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhook/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhooks/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhooks/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|||||||
@@ -5,16 +5,8 @@ variables:
|
|||||||
buildConfiguration: 'Release'
|
buildConfiguration: 'Release'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Use .NET 7'
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: 7.0.x
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework net7.0 --logger trx
|
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework net6.0 --logger trx
|
||||||
displayName: 'Test'
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
testRunner: VSTest
|
testRunner: VSTest
|
||||||
|
|||||||
@@ -14,12 +14,6 @@ jobs:
|
|||||||
echo "BuildId = $(buildId)"
|
echo "BuildId = $(buildId)"
|
||||||
displayName: 'Print buildId'
|
displayName: 'Print buildId'
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: Use .NET 7.0
|
|
||||||
inputs:
|
|
||||||
packageType: 'sdk'
|
|
||||||
version: '7.0.x'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: "Use JDK11 by default"
|
displayName: "Use JDK11 by default"
|
||||||
inputs:
|
inputs:
|
||||||
@@ -41,20 +35,22 @@ jobs:
|
|||||||
projectKey: 'WireMock-Net_WireMock.Net'
|
projectKey: 'WireMock-Net_WireMock.Net'
|
||||||
projectName: 'WireMock.Net'
|
projectName: 'WireMock.Net'
|
||||||
extraProperties: |
|
extraProperties: |
|
||||||
sonar.cs.opencover.reportsPaths=**/coverage.net7.0.opencover.xml
|
sonar.cs.opencover.reportsPaths=**/coverage.net6.0.opencover.xml
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'Build Unit tests'
|
displayName: 'Build Unit tests'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'build'
|
command: 'build'
|
||||||
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
||||||
arguments: '--configuration Debug --framework net7.0'
|
arguments: '--configuration Debug --framework net6.0'
|
||||||
|
|
||||||
- task: CmdLine@2
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'Execute Unit tests'
|
||||||
inputs:
|
inputs:
|
||||||
script: 'dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --no-build --configuration Debug --framework net7.0'
|
command: 'test'
|
||||||
displayName: 'Execute Unit Tests with Coverage'
|
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
||||||
|
arguments: '--no-build --configuration Debug --framework net6.0 --collect:"XPlat Code Coverage" --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover'
|
||||||
|
|
||||||
- task: SonarCloudAnalyze@1
|
- task: SonarCloudAnalyze@1
|
||||||
displayName: 'SonarCloud: Run Code Analysis'
|
displayName: 'SonarCloud: Run Code Analysis'
|
||||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
@@ -68,7 +64,7 @@ jobs:
|
|||||||
condition: and(succeeded(), eq(variables['RUN_WHITESOURCE'], 'yes'))
|
condition: and(succeeded(), eq(variables['RUN_WHITESOURCE'], 'yes'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN) -f ./test/WireMock.Net.Tests/coverage.7.0.opencover.xml
|
bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN) -f ./test/WireMock.Net.Tests/coverage.net6.0.opencover.xml
|
||||||
displayName: 'codecov'
|
displayName: 'codecov'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
@@ -80,7 +76,7 @@ jobs:
|
|||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish coverage file
|
displayName: Publish coverage file
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: './test/WireMock.Net.Tests/coverage.net7.0.opencover.xml'
|
PathtoPublish: '/home/vsts/work/1/s/test/WireMock.Net.Tests/coverage.net6.0.opencover.xml'
|
||||||
|
|
||||||
- job: Windows_Build_Test
|
- job: Windows_Build_Test
|
||||||
|
|
||||||
@@ -89,24 +85,24 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: Use .NET 7.0
|
displayName: Use .NET 6.0
|
||||||
inputs:
|
inputs:
|
||||||
packageType: 'sdk'
|
packageType: 'sdk'
|
||||||
version: '7.0.x'
|
version: '6.0.x'
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'Build Unit tests'
|
displayName: 'Build Unit tests'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'build'
|
command: 'build'
|
||||||
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
||||||
arguments: '--configuration Debug --framework net7.0'
|
arguments: '--configuration Debug --framework net6.0'
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'Execute Unit Tests with Coverage'
|
displayName: 'Execute Unit tests'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'test'
|
command: 'test'
|
||||||
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
projects: './test/WireMock.Net.Tests/WireMock.Net.Tests.csproj'
|
||||||
arguments: '--no-build --configuration Debug --framework net7.0 --collect:"XPlat Code Coverage" --logger trx'
|
arguments: '--no-build --configuration Debug --framework net6.0 --collect:"XPlat Code Coverage" --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover'
|
||||||
|
|
||||||
- job: Windows_Release_to_MyGet
|
- job: Windows_Release_to_MyGet
|
||||||
dependsOn: Windows_Build_Test
|
dependsOn: Windows_Build_Test
|
||||||
@@ -116,10 +112,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: Use .NET 7.0
|
displayName: Use .NET 6.0
|
||||||
inputs:
|
inputs:
|
||||||
packageType: 'sdk'
|
packageType: 'sdk'
|
||||||
version: '7.0.x'
|
version: '6.0.x'
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: Build Release
|
displayName: Build Release
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ variables:
|
|||||||
buildConfiguration: 'Release'
|
buildConfiguration: 'Release'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Use .NET 7'
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: 7.0.x
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: Build Release
|
displayName: Build Release
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ steps:
|
|||||||
echo "BuildId = $(buildId)"
|
echo "BuildId = $(buildId)"
|
||||||
displayName: 'Print buildId'
|
displayName: 'Print buildId'
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Use .NET 7'
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: 7.0.x
|
|
||||||
|
|
||||||
# Based on https://whereslou.com/2018/09/versioning-and-publishing-nuget-packages-automatically-using-azure-devops-pipelines/
|
# Based on https://whereslou.com/2018/09/versioning-and-publishing-nuget-packages-automatically-using-azure-devops-pipelines/
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: Build Release
|
displayName: Build Release
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.15" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.15" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.15" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -33,11 +33,11 @@
|
|||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.15" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,11 @@
|
|||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.3.10" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.15" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -42,14 +42,14 @@
|
|||||||
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net452\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net452\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.10\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.5\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\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">
|
||||||
@@ -61,9 +61,6 @@
|
|||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Stef.Validation, Version=0.1.1.0, Culture=neutral, PublicKeyToken=8f3400880c321038, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Stef.Validation.0.1.1\lib\net40\Stef.Validation.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|||||||
@@ -2,12 +2,11 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.3.0" targetFramework="net452" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net" version="2.1.2" targetFramework="net452" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.3.10" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers" version="2.3.5" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.3.10" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.5" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.15" targetFramework="net452" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
||||||
<package id="Stef.Validation" version="0.1.1" targetFramework="net452" />
|
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -41,14 +41,14 @@
|
|||||||
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.10\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.5\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||||
@@ -59,9 +59,6 @@
|
|||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Stef.Validation, Version=0.1.1.0, Culture=neutral, PublicKeyToken=8f3400880c321038, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Stef.Validation.0.1.1\lib\net40\Stef.Validation.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|||||||
@@ -2,12 +2,11 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.3.0" targetFramework="net461" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net" version="2.1.2" targetFramework="net461" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.3.10" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers" version="2.3.5" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.3.10" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.5" targetFramework="net461" />
|
||||||
<package id="log4net" version="2.0.15" targetFramework="net461" />
|
<package id="log4net" version="2.0.14" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="Stef.Validation" version="0.1.1" targetFramework="net461" />
|
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.10.0" newVersion="2.3.10.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.3.5.0" newVersion="2.3.5.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="XPath2" publicKeyToken="463c6d7fb740c7e5" culture="neutral" />
|
<assemblyIdentity name="XPath2" publicKeyToken="463c6d7fb740c7e5" culture="neutral" />
|
||||||
@@ -67,40 +67,16 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Handlebars.Net.Helpers" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
<assemblyIdentity name="Handlebars.Net.Helpers" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.10.0" newVersion="2.3.10.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.3.5.0" newVersion="2.3.5.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Linq.Dynamic.Core" publicKeyToken="0f07ec44de6ac832" culture="neutral" />
|
<assemblyIdentity name="System.Linq.Dynamic.Core" publicKeyToken="0f07ec44de6ac832" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.2.23.0" newVersion="1.2.23.0" />
|
<bindingRedirect oldVersion="0.0.0.0-1.2.18.0" newVersion="1.2.18.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Fare" publicKeyToken="ea68d375bf33a7c8" culture="neutral" />
|
<assemblyIdentity name="Fare" publicKeyToken="ea68d375bf33a7c8" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Stef.Validation" publicKeyToken="8f3400880c321038" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-0.1.1.0" newVersion="0.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="HandlebarsDotNet.Helpers.Json" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.10.0" newVersion="2.3.10.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.25.0.0" newVersion="6.25.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.25.0.0" newVersion="6.25.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.25.0.0" newVersion="6.25.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\..\packages\Nullable.1.3.1\build\Nullable.props" Condition="Exists('..\..\packages\Nullable.1.3.1\build\Nullable.props')" />
|
|
||||||
<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="..\..\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')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -49,29 +48,29 @@
|
|||||||
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.10\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.5\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.DynamicLinq, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.DynamicLinq, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.DynamicLinq.2.3.10\lib\net452\HandlebarsDotNet.Helpers.DynamicLinq.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.DynamicLinq.2.3.5\lib\net452\HandlebarsDotNet.Helpers.DynamicLinq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Humanizer, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Humanizer, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Humanizer.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Humanizer.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Humanizer.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Humanizer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Json, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Json, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Json.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Json.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Json.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Random, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Random, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Random.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Random.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Random.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Random.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Xeger, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Xeger, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Xeger.2.3.10\lib\net452\HandlebarsDotNet.Helpers.Xeger.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Xeger.2.3.5\lib\net452\HandlebarsDotNet.Helpers.Xeger.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.XPath, Version=2.3.10.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.XPath, Version=2.3.5.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.XPath.2.3.10\lib\net452\HandlebarsDotNet.Helpers.XPath.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.XPath.2.3.5\lib\net452\HandlebarsDotNet.Helpers.XPath.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Humanizer, Version=2.14.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
<Reference Include="Humanizer, Version=2.14.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Humanizer.Core.2.14.1\lib\netstandard2.0\Humanizer.dll</HintPath>
|
<HintPath>..\..\packages\Humanizer.Core.2.14.1\lib\netstandard2.0\Humanizer.dll</HintPath>
|
||||||
@@ -79,8 +78,8 @@
|
|||||||
<Reference Include="JmesPath.Net, Version=1.0.125.0, Culture=neutral, PublicKeyToken=b29d616b7f4faff0, processorArchitecture=MSIL">
|
<Reference Include="JmesPath.Net, Version=1.0.125.0, Culture=neutral, PublicKeyToken=b29d616b7f4faff0, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\JmesPath.Net.1.0.125\lib\net45\JmesPath.Net.dll</HintPath>
|
<HintPath>..\..\packages\JmesPath.Net.1.0.125\lib\net45\JmesPath.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
||||||
@@ -157,9 +156,6 @@
|
|||||||
<Reference Include="Microsoft.AspNetCore.WebUtilities, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.WebUtilities.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -232,14 +228,11 @@
|
|||||||
<Reference Include="Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.25.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.IdentityModel.Abstractions.6.25.0\lib\net472\Microsoft.IdentityModel.Abstractions.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.IdentityModel.JsonWebTokens.6.12.2\lib\net472\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.25.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IdentityModel.Logging, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.IdentityModel.JsonWebTokens.6.25.0\lib\net472\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Logging.6.12.2\lib\net472\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=6.25.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.IdentityModel.Logging.6.25.0\lib\net472\Microsoft.IdentityModel.Logging.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.IdentityModel.Protocols, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IdentityModel.Protocols, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.IdentityModel.Protocols.6.12.2\lib\net472\Microsoft.IdentityModel.Protocols.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Protocols.6.12.2\lib\net472\Microsoft.IdentityModel.Protocols.dll</HintPath>
|
||||||
@@ -247,8 +240,8 @@
|
|||||||
<Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.6.12.2\lib\net472\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.6.12.2\lib\net472\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=6.25.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IdentityModel.Tokens, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.IdentityModel.Tokens.6.25.0\lib\net472\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.IdentityModel.Tokens.6.12.2\lib\net472\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Net.Http.Headers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Net.Http.Headers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
||||||
@@ -268,8 +261,8 @@
|
|||||||
<Reference Include="NSwag.Core, Version=13.15.10.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
|
<Reference Include="NSwag.Core, Version=13.15.10.0, Culture=neutral, PublicKeyToken=c2d88086e098d109, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\NSwag.Core.13.15.10\lib\net45\NSwag.Core.dll</HintPath>
|
<HintPath>..\..\packages\NSwag.Core.13.15.10\lib\net45\NSwag.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RandomDataGenerator, Version=1.0.16.0, Culture=neutral, PublicKeyToken=ae5c571d29a3b8d9, processorArchitecture=MSIL">
|
<Reference Include="RandomDataGenerator, Version=1.0.15.0, Culture=neutral, PublicKeyToken=ae5c571d29a3b8d9, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\RandomDataGenerator.Net.1.0.17\lib\net45\RandomDataGenerator.dll</HintPath>
|
<HintPath>..\..\packages\RandomDataGenerator.Net.1.0.16\lib\net45\RandomDataGenerator.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Scriban.Signed, Version=2.1.4.0, Culture=neutral, PublicKeyToken=5675fb69b15f2433, processorArchitecture=MSIL">
|
<Reference Include="Scriban.Signed, Version=2.1.4.0, Culture=neutral, PublicKeyToken=5675fb69b15f2433, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Scriban.Signed.2.1.4\lib\net45\Scriban.Signed.dll</HintPath>
|
<HintPath>..\..\packages\Scriban.Signed.2.1.4\lib\net45\Scriban.Signed.dll</HintPath>
|
||||||
@@ -277,8 +270,8 @@
|
|||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Stef.Validation, Version=0.1.1.0, Culture=neutral, PublicKeyToken=8f3400880c321038, processorArchitecture=MSIL">
|
<Reference Include="Stef.Validation, Version=0.1.0.0, Culture=neutral, PublicKeyToken=8f3400880c321038, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Stef.Validation.0.1.1\lib\net40\Stef.Validation.dll</HintPath>
|
<HintPath>..\..\packages\Stef.Validation.0.1.0\lib\net40\Stef.Validation.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
@@ -296,14 +289,14 @@
|
|||||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.25.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IdentityModel.Tokens.Jwt.6.25.0\lib\net472\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
<HintPath>..\..\packages\System.IdentityModel.Tokens.Jwt.6.12.2\lib\net472\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IO.Pipelines.4.5.3\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
<HintPath>..\..\packages\System.IO.Pipelines.4.5.3\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.23.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.18.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.23\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.18\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
<HintPath>..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
@@ -333,11 +326,8 @@
|
|||||||
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll</HintPath>
|
<HintPath>..\..\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Text.Json.4.7.2\lib\net461\System.Text.Json.dll</HintPath>
|
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||||
@@ -408,7 +398,6 @@
|
|||||||
<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.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.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'))" />
|
<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'))" />
|
||||||
<Error Condition="!Exists('..\..\packages\Nullable.1.3.1\build\Nullable.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nullable.1.3.1\build\Nullable.props'))" />
|
|
||||||
</Target>
|
</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.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.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')" />
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
<package id="AnyOf" version="0.3.0" targetFramework="net472" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net472" />
|
||||||
<package id="Fare" version="2.2.1" targetFramework="net472" />
|
<package id="Fare" version="2.2.1" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net" version="2.1.2" targetFramework="net472" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.DynamicLinq" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.DynamicLinq" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Humanizer" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Humanizer" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Json" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Json" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Random" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Random" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Xeger" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Xeger" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.XPath" version="2.3.10" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.XPath" version="2.3.5" targetFramework="net472" />
|
||||||
<package id="Humanizer" version="2.14.1" targetFramework="net472" />
|
<package id="Humanizer" version="2.14.1" targetFramework="net472" />
|
||||||
<package id="Humanizer.Core" version="2.14.1" targetFramework="net472" />
|
<package id="Humanizer.Core" version="2.14.1" targetFramework="net472" />
|
||||||
<package id="Humanizer.Core.af" version="2.14.1" targetFramework="net472" />
|
<package id="Humanizer.Core.af" version="2.14.1" targetFramework="net472" />
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<package id="Humanizer.Core.zh-Hans" version="2.14.1" targetFramework="net472" />
|
<package id="Humanizer.Core.zh-Hans" version="2.14.1" targetFramework="net472" />
|
||||||
<package id="Humanizer.Core.zh-Hant" version="2.14.1" targetFramework="net472" />
|
<package id="Humanizer.Core.zh-Hant" version="2.14.1" targetFramework="net472" />
|
||||||
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
||||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
<package id="log4net" version="2.0.14" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.8" targetFramework="net472" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.8" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net472" />
|
||||||
@@ -89,7 +89,6 @@
|
|||||||
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" 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.Server.Kestrel.Transport.Sockets" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore.WebUtilities" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore.WebUtilities" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net472" />
|
|
||||||
<package id="Microsoft.CSharp" version="4.5.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" version="5.0.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="5.0.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Configuration.Abstractions" version="5.0.0" targetFramework="net472" />
|
||||||
@@ -115,40 +114,37 @@
|
|||||||
<package id="Microsoft.Extensions.Options" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Options" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.Extensions.Primitives" version="5.0.0" targetFramework="net472" />
|
<package id="Microsoft.Extensions.Primitives" version="5.0.0" targetFramework="net472" />
|
||||||
<package id="Microsoft.IdentityModel.Abstractions" version="6.25.0" targetFramework="net472" />
|
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.25.0" targetFramework="net472" />
|
<package id="Microsoft.IdentityModel.Logging" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="Microsoft.IdentityModel.Logging" version="6.25.0" targetFramework="net472" />
|
|
||||||
<package id="Microsoft.IdentityModel.Protocols" version="6.12.2" targetFramework="net472" />
|
<package id="Microsoft.IdentityModel.Protocols" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.12.2" targetFramework="net472" />
|
<package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="Microsoft.IdentityModel.Tokens" version="6.25.0" targetFramework="net472" />
|
<package id="Microsoft.IdentityModel.Tokens" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net472" />
|
||||||
<package id="Namotion.Reflection" version="2.0.10" targetFramework="net472" />
|
<package id="Namotion.Reflection" version="2.0.10" targetFramework="net472" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||||
<package id="NJsonSchema" version="10.6.10" targetFramework="net472" />
|
<package id="NJsonSchema" version="10.6.10" targetFramework="net472" />
|
||||||
<package id="NJsonSchema.Extensions" version="0.1.0" targetFramework="net472" />
|
<package id="NJsonSchema.Extensions" version="0.1.0" targetFramework="net472" />
|
||||||
<package id="NSwag.Core" version="13.15.10" targetFramework="net472" />
|
<package id="NSwag.Core" version="13.15.10" targetFramework="net472" />
|
||||||
<package id="Nullable" version="1.3.1" targetFramework="net472" developmentDependency="true" />
|
<package id="Nullable" version="1.3.0" targetFramework="net472" developmentDependency="true" />
|
||||||
<package id="RandomDataGenerator.Net" version="1.0.17" targetFramework="net472" />
|
<package id="RandomDataGenerator.Net" version="1.0.16" targetFramework="net472" />
|
||||||
<package id="Scriban.Signed" version="2.1.4" targetFramework="net472" />
|
<package id="Scriban.Signed" version="2.1.4" targetFramework="net472" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="Stef.Validation" version="0.1.1" targetFramework="net472" />
|
<package id="Stef.Validation" version="0.1.0" targetFramework="net472" />
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net472" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net472" />
|
||||||
<package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="net472" />
|
<package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net472" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.IdentityModel.Tokens.Jwt" version="6.25.0" targetFramework="net472" />
|
<package id="System.IdentityModel.Tokens.Jwt" version="6.12.2" targetFramework="net472" />
|
||||||
<package id="System.IO.Pipelines" version="4.5.3" targetFramework="net472" />
|
<package id="System.IO.Pipelines" version="4.5.3" targetFramework="net472" />
|
||||||
<package id="System.Linq.Dynamic.Core" version="1.2.23" targetFramework="net472" />
|
<package id="System.Linq.Dynamic.Core" version="1.2.18" targetFramework="net472" />
|
||||||
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
|
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net472" />
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net472" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||||
<package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net472" />
|
<package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net472" />
|
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net472" />
|
|
||||||
<package id="System.Text.Encodings.Web" version="4.7.2" targetFramework="net472" />
|
<package id="System.Text.Encodings.Web" version="4.7.2" targetFramework="net472" />
|
||||||
<package id="System.Text.Json" version="4.7.2" targetFramework="net472" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net472" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||||
<package id="TinyMapper" version="3.0.3" targetFramework="net472" />
|
<package id="TinyMapper" version="3.0.3" targetFramework="net472" />
|
||||||
<package id="XPath2" version="1.1.3" targetFramework="net472" />
|
<package id="XPath2" version="1.1.3" targetFramework="net472" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
</startup>
|
</startup>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
@@ -11,4 +11,4 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -8,10 +8,9 @@
|
|||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RootNamespace>WireMock.Net.Service</RootNamespace>
|
<RootNamespace>WireMock.Net.Service</RootNamespace>
|
||||||
<AssemblyName>WireMock.Net.Service</AssemblyName>
|
<AssemblyName>WireMock.Net.Service</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
@@ -33,8 +32,8 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
|
|||||||
@@ -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.15" targetFramework="net48" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
||||||
@@ -11,6 +11,6 @@
|
|||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
||||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net452" requireReinstallation="true" />
|
<package id="System.Net.Http" version="4.3.4" targetFramework="net452" />
|
||||||
<package id="XPath2" version="1.1.3" targetFramework="net452" />
|
<package id="XPath2" version="1.1.3" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -3,7 +3,6 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using log4net;
|
using log4net;
|
||||||
using log4net.Config;
|
using log4net.Config;
|
||||||
using log4net.Repository;
|
using log4net.Repository;
|
||||||
@@ -11,112 +10,71 @@ using WireMock.RequestBuilders;
|
|||||||
using WireMock.ResponseBuilders;
|
using WireMock.ResponseBuilders;
|
||||||
using WireMock.Server;
|
using WireMock.Server;
|
||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
|
using WireMock.Util;
|
||||||
|
|
||||||
namespace WireMock.Net.StandAlone.NETCoreApp;
|
namespace WireMock.Net.StandAlone.NETCoreApp
|
||||||
|
|
||||||
static class Program
|
|
||||||
{
|
{
|
||||||
private static readonly ILoggerRepository LogRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
|
static class Program
|
||||||
// private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
|
|
||||||
|
|
||||||
private static int sleepTime = 30000;
|
|
||||||
private static WireMockServer _server;
|
|
||||||
|
|
||||||
static async Task Main(string[] args)
|
|
||||||
{
|
{
|
||||||
await TestAsync().ConfigureAwait(false);
|
private static readonly ILoggerRepository LogRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
|
||||||
return;
|
// private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
|
||||||
|
|
||||||
XmlConfigurator.Configure(LogRepository, new FileInfo("log4net.config"));
|
private static int sleepTime = 30000;
|
||||||
|
private static WireMockServer _server;
|
||||||
|
|
||||||
if (!WireMockServerSettingsParser.TryParseArguments(args, out var settings, new WireMockLog4NetLogger()))
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
return;
|
XmlConfigurator.Configure(LogRepository, new FileInfo("log4net.config"));
|
||||||
|
|
||||||
|
if (!WireMockServerSettingsParser.TryParseArguments(args, out var settings, new WireMockLog4NetLogger()))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||||
|
|
||||||
|
_server = WireMockServer.Start(settings);
|
||||||
|
|
||||||
|
//_server.Given(Request.Create().WithPath("/api/sap")
|
||||||
|
// .UsingPost()
|
||||||
|
// .WithBody((IBodyData xmlData) =>
|
||||||
|
// {
|
||||||
|
// //xmlData is always null
|
||||||
|
// return true;
|
||||||
|
// }))
|
||||||
|
// .RespondWith(Response.Create().WithStatusCode(System.Net.HttpStatusCode.OK));
|
||||||
|
|
||||||
|
//_server
|
||||||
|
// .Given(Request.Create()
|
||||||
|
// .UsingAnyMethod())
|
||||||
|
// .RespondWith(Response.Create()
|
||||||
|
// .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.CancelKeyPress += (s, e) =>
|
||||||
|
{
|
||||||
|
Stop("CancelKeyPress");
|
||||||
|
};
|
||||||
|
|
||||||
|
System.Runtime.Loader.AssemblyLoadContext.Default.Unloading += ctx =>
|
||||||
|
{
|
||||||
|
Stop("AssemblyLoadContext.Default.Unloading");
|
||||||
|
};
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server running : {_server.IsStarted}");
|
||||||
|
Thread.Sleep(sleepTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
private static void Stop(string why)
|
||||||
|
|
||||||
_server = WireMockServer.Start(settings);
|
|
||||||
|
|
||||||
//_server.Given(Request.Create().WithPath("/api/sap")
|
|
||||||
// .UsingPost()
|
|
||||||
// .WithBody((IBodyData xmlData) =>
|
|
||||||
// {
|
|
||||||
// //xmlData is always null
|
|
||||||
// return true;
|
|
||||||
// }))
|
|
||||||
// .RespondWith(Response.Create().WithStatusCode(System.Net.HttpStatusCode.OK));
|
|
||||||
|
|
||||||
//_server
|
|
||||||
// .Given(Request.Create()
|
|
||||||
// .UsingAnyMethod())
|
|
||||||
// .RespondWith(Response.Create()
|
|
||||||
// .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.CancelKeyPress += (s, e) =>
|
|
||||||
{
|
{
|
||||||
Stop("CancelKeyPress");
|
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server stopping because '{why}'");
|
||||||
};
|
_server.Stop();
|
||||||
|
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server stopped");
|
||||||
System.Runtime.Loader.AssemblyLoadContext.Default.Unloading += ctx =>
|
|
||||||
{
|
|
||||||
Stop("AssemblyLoadContext.Default.Unloading");
|
|
||||||
};
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server running : {_server.IsStarted}");
|
|
||||||
Thread.Sleep(sleepTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private static void Stop(string why)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server stopping because '{why}'");
|
|
||||||
_server.Stop();
|
|
||||||
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server stopped");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static async Task TestAsync()
|
|
||||||
{
|
|
||||||
for (var i = 0; i < 20; i++)
|
|
||||||
{
|
|
||||||
var server = WireMockServer.Start();
|
|
||||||
|
|
||||||
server
|
|
||||||
.Given(
|
|
||||||
Request.Create().WithPath("/some/thing").UsingGet()
|
|
||||||
)
|
|
||||||
.RespondWith(
|
|
||||||
Response.Create()
|
|
||||||
.WithStatusCode(200)
|
|
||||||
.WithHeader("Content-Type", "text/plain")
|
|
||||||
.WithBody("Hello world! : " + i)
|
|
||||||
);
|
|
||||||
|
|
||||||
server
|
|
||||||
.Given(
|
|
||||||
Request.Create().WithPath("/some/thing").UsingGet()
|
|
||||||
)
|
|
||||||
.RespondWith(
|
|
||||||
Response.Create()
|
|
||||||
.WithStatusCode(200)
|
|
||||||
.WithHeader("Content-Type", "text/plain")
|
|
||||||
.WithBody("Hello world duplicate! : " + i)
|
|
||||||
);
|
|
||||||
|
|
||||||
var client = server.CreateClient();
|
|
||||||
|
|
||||||
var response = await client.GetAsync($"{server.Url}/some/thing").ConfigureAwait(false);
|
|
||||||
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
||||||
Console.WriteLine($"counter {i} value:{content}");
|
|
||||||
|
|
||||||
server.Reset();
|
|
||||||
server.Dispose();
|
|
||||||
server.Stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="log4net" Version="2.0.15" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
<StartupObject>WireMock.Net.StandAlone.Net452.Program</StartupObject>
|
<StartupObject>WireMock.Net.StandAlone.Net452.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.0.0\lib\net451\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.0.0\lib\net451\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
|
|||||||
@@ -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.15" targetFramework="net452" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Security.Cryptography.X509Certificates" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Security.Cryptography.X509Certificates" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Cng" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Security.Cryptography.Cng" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.3.1.1" newVersion="4.3.1.1" />
|
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Linq.Dynamic.Core" publicKeyToken="0f07ec44de6ac832" culture="neutral" />
|
<assemblyIdentity name="System.Linq.Dynamic.Core" publicKeyToken="0f07ec44de6ac832" culture="neutral" />
|
||||||
@@ -66,50 +66,6 @@
|
|||||||
<assemblyIdentity name="System.Security.Principal.Windows" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Security.Principal.Windows" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.1" newVersion="4.1.1.1" />
|
<bindingRedirect oldVersion="0.0.0.0-4.1.1.1" newVersion="4.1.1.1" />
|
||||||
</dependentAssembly>
|
</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>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.1.10.0" newVersion="2.1.10.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.9.0" newVersion="5.2.9.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.9.0" newVersion="5.2.9.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.AspNetCore.Hosting" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.2.7.0" newVersion="2.2.7.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.AspNetCore.Http" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.2.2.0" newVersion="2.2.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.AspNetCore.Routing" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.2.2.0" newVersion="2.2.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.2.1.0" newVersion="2.2.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.AspNetCore.Server.IISIntegration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.2.1.0" newVersion="2.2.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<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="..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.1.1\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props" Condition="Exists('..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.1.1\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props')" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -42,164 +42,158 @@
|
|||||||
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.2.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.2\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore, Version=2.1.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.2.1.4\lib\netstandard2.0\Microsoft.AspNetCore.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Authentication.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Authentication.Abstractions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Authentication.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Authentication.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Authentication.Core, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Authentication.Core.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Connections.Abstractions.2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Diagnostics, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Diagnostics, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.Diagnostics.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Diagnostics.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Diagnostics.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Diagnostics.Abstractions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Diagnostics.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.HostFiltering, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.HostFiltering, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.HostFiltering.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.HostFiltering.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.HostFiltering.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.HostFiltering.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Hosting, Version=2.2.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Hosting, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.2.2.7\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Http, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Http, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Http.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Http.Abstractions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Http.Extensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Http.Extensions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.Extensions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Http.Features.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.HttpOverrides, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.HttpOverrides, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.HttpOverrides.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.HttpOverrides.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.HttpOverrides.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.HttpOverrides.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Routing, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Routing, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.Routing.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Routing.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Routing.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Routing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Routing.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Routing.Abstractions, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Routing.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Routing.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.IIS, Version=2.2.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.2.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.1.2\lib\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration, Version=2.2.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.1\lib\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.3.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Core.2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Https, Version=2.1.3.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Https.2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Https.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Https, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions, Version=2.1.3.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.1.3.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>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.2.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNetCore.WebUtilities, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.2.2.1\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNetCore.WebUtilities.2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNetCore.WebUtilities, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNetCore.WebUtilities.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Binder.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.CommandLine, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.CommandLine.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.CommandLine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.CommandLine, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.2.2.4\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Json.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.2.2.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.FileProviders.Physical.2.1.1\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.FileSystemGlobbing.2.1.1\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Hosting.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Logging.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging.Configuration, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Configuration.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Configuration.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Configuration, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging.Console, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Console.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Console.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Console, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging.Debug, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Debug.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Debug.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Debug, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.ObjectPool, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.ObjectPool.2.1.1\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging.EventSource, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Options, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Extensions.Options.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.ObjectPool, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.ObjectPool.2.2.0\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Options, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Primitives, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Options.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Net.Http.Headers, Version=2.1.1.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>
|
<HintPath>..\..\packages\Microsoft.Net.Http.Headers.2.1.1\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Primitives, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.4.0.0\lib\net451\Microsoft.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Net.Http.Headers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.0.0\lib\net451\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.4.2.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Hosting.4.0.0\lib\net451\Microsoft.Owin.Hosting.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Host.HttpListener.4.2.2\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Owin.Hosting, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Hosting.4.2.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MimeKitLite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
|
<Reference Include="MimeKitLite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\MimeKitLite.2.0.7\lib\net45\MimeKitLite.dll</HintPath>
|
<HintPath>..\..\packages\MimeKitLite.2.0.7\lib\net45\MimeKitLite.dll</HintPath>
|
||||||
@@ -218,32 +212,28 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
<HintPath>..\..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
||||||
</Reference>
|
</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.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IO.Pipelines.4.5.3\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
<HintPath>..\..\packages\System.IO.Pipelines.4.5.2\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.23.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.18.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.23\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.18\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
<Reference Include="System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.9\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.4\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
@@ -254,14 +244,14 @@
|
|||||||
<HintPath>..\..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
<HintPath>..\..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.Cng, Version=4.3.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<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.2\lib\net461\System.Security.Cryptography.Cng.dll</HintPath>
|
<HintPath>..\..\packages\System.Security.Cryptography.Cng.4.5.0\lib\net461\System.Security.Cryptography.Cng.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
<HintPath>..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||||
@@ -278,18 +268,18 @@
|
|||||||
<Reference Include="System.Text.Encodings.Web, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Encodings.Web, Version=4.0.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>
|
<HintPath>..\..\packages\System.Text.Encodings.Web.4.5.0\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.9\lib\net45\System.Web.Http.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.4\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.Owin, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.Owin, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.9\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.4\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
@@ -324,12 +314,8 @@
|
|||||||
<PropertyGroup>
|
<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>
|
<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>
|
</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.1.1\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.1.1\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.Extensions.Configuration.UserSecrets.2.1.1\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.1.1\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.1\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.1\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets'))" />
|
|
||||||
</Target>
|
</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.Extensions.Configuration.UserSecrets.2.1.1\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets" Condition="Exists('..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.1.1\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.1\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets" Condition="Exists('..\..\packages\Microsoft.AspNetCore.Server.IISIntegration.2.2.1\build\netstandard2.0\Microsoft.AspNetCore.Server.IISIntegration.targets')" />
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,86 +1,83 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Handlebars.Net" version="2.1.2" targetFramework="net461" />
|
<package id="Handlebars.Net" version="2.1.2" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.9" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.9" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.9" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.9" targetFramework="net461" />
|
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore" version="2.1.4" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Authentication.Core" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Authentication.Core" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Connections.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Connections.Abstractions" version="2.1.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Diagnostics" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Diagnostics" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Diagnostics.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Diagnostics.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.HostFiltering" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.HostFiltering" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Hosting" version="2.2.7" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Hosting" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http" version="2.2.2" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http" version="2.1.22" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http.Extensions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http.Extensions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Http.Features" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Http.Features" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.HttpOverrides" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.HttpOverrides" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Routing" version="2.2.2" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Routing" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Routing.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Routing.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.IIS" version="2.2.6" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Server.IISIntegration" version="2.1.2" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.IISIntegration" version="2.2.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Server.Kestrel" version="2.1.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.Kestrel" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Core" version="2.1.25" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.Kestrel.Core" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Https" version="2.1.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.Kestrel.Https" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" version="2.1.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" version="2.1.3" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" version="2.2.1" targetFramework="net461" />
|
<package id="Microsoft.AspNetCore.WebUtilities" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.AspNetCore.WebUtilities" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.Binder" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.Binder" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.CommandLine" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.CommandLine" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.2.4" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.Json" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.Json" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.DependencyInjection" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.FileProviders.Physical" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.FileProviders.Physical" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.FileSystemGlobbing" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.FileSystemGlobbing" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Hosting.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Hosting.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Logging" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Logging" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Logging.Configuration" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Logging.Configuration" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Logging.Console" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Logging.Console" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Logging.Debug" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Logging.Debug" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.ObjectPool" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Logging.EventSource" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Options" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.ObjectPool" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Options" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.Primitives" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Net.Http.Headers" version="2.1.1" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.Primitives" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Owin" version="4.0.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.Owin" version="4.2.2" targetFramework="net461" />
|
<package id="Microsoft.Owin.Hosting" version="4.0.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="4.2.2" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Owin.Hosting" version="4.2.2" targetFramework="net461" />
|
|
||||||
<package id="MimeKitLite" version="2.0.7" targetFramework="net461" />
|
<package id="MimeKitLite" version="2.0.7" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net461" />
|
<package id="Owin" version="1.0" targetFramework="net461" />
|
||||||
<package id="RestEase" version="1.5.7" targetFramework="net461" />
|
<package id="RestEase" version="1.5.7" targetFramework="net461" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
|
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
||||||
<package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="net461" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net461" />
|
<package id="System.IO.Pipelines" version="4.5.2" targetFramework="net461" />
|
||||||
<package id="System.IO.Pipelines" version="4.5.3" targetFramework="net461" />
|
<package id="System.Linq.Dynamic.Core" version="1.2.18" targetFramework="net461" />
|
||||||
<package id="System.Linq.Dynamic.Core" version="1.2.23" targetFramework="net461" />
|
<package id="System.Memory" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Memory" version="4.5.4" targetFramework="net461" />
|
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net461" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" />
|
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" />
|
||||||
<package id="System.Security.Cryptography.Cng" version="4.5.2" targetFramework="net461" />
|
<package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
|
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
|
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" />
|
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" />
|
||||||
<package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
|
<package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Text.Encodings.Web" version="4.5.1" targetFramework="net461" />
|
<package id="System.Text.Encodings.Web" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="XPath2" version="1.1.3" targetFramework="net461" />
|
<package id="XPath2" version="1.1.3" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -14,11 +14,6 @@ public class MappingModel
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? Guid { get; set; }
|
public Guid? Guid { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The datetime when this mapping was created or updated.
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? UpdatedAt { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the TimeSettings when which this mapping should be used.
|
/// Gets or sets the TimeSettings when which this mapping should be used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -96,16 +96,4 @@ public class SettingsModel
|
|||||||
/// Default value = "All".
|
/// Default value = "All".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public QueryParameterMultipleValueSupport? QueryParameterMultipleValueSupport { get; set; }
|
public QueryParameterMultipleValueSupport? QueryParameterMultipleValueSupport { get; set; }
|
||||||
|
|
||||||
#if NETSTANDARD1_3_OR_GREATER || NET461
|
|
||||||
/// <summary>
|
|
||||||
/// Server client certificate mode
|
|
||||||
/// </summary>
|
|
||||||
public ClientCertificateMode ClientCertificateMode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Whether to accept any client certificate
|
|
||||||
/// </summary>
|
|
||||||
public bool AcceptAnyClientCertificate { get; set; }
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
#if NETSTANDARD1_3_OR_GREATER || NET461
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
#endif
|
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
|
|
||||||
@@ -137,11 +134,4 @@ public interface IRequestMessage
|
|||||||
/// Gets the origin
|
/// Gets the origin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Origin { get; }
|
string Origin { get; }
|
||||||
|
|
||||||
#if NETSTANDARD1_3_OR_GREATER || NET461
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the connection's client certificate
|
|
||||||
/// </summary>
|
|
||||||
X509Certificate2? ClientCertificate { get; }
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
namespace WireMock.Types;
|
|
||||||
|
|
||||||
#if NETSTANDARD1_3_OR_GREATER || NET461
|
|
||||||
/// <summary>
|
|
||||||
/// Describes the client certificate requirements for a HTTPS connection.
|
|
||||||
/// This enum is the same as https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.https.clientcertificatemode
|
|
||||||
/// </summary>
|
|
||||||
public enum ClientCertificateMode
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A client certificate is not required and will not be requested from clients.
|
|
||||||
/// </summary>
|
|
||||||
NoCertificate,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A client certificate will be requested; however, authentication will not fail if a certificate is not provided by the client.
|
|
||||||
/// </summary>
|
|
||||||
AllowCertificate,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A client certificate will be requested, and the client must provide a valid certificate for authentication to succeed.
|
|
||||||
/// </summary>
|
|
||||||
RequireCertificate,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A client certificate is not required and will not be requested from clients at the start of the connection.
|
|
||||||
/// It may be requested by the application later.
|
|
||||||
/// </summary>
|
|
||||||
DelayCertificate,
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,25 +1,36 @@
|
|||||||
namespace WireMock.Types;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
namespace WireMock.Types
|
||||||
/// Logic to use when replace a JSON node using the Transformer.
|
|
||||||
/// </summary>
|
|
||||||
public enum ReplaceNodeOptions
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Try to evaluate a templated value.
|
/// Flags to use when replace a JSON node using the Transformer.
|
||||||
/// In case this is valid, return the value and if the value can be converted to a primitive type, use that value.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
EvaluateAndTryToConvert = 0,
|
[Flags]
|
||||||
|
public enum ReplaceNodeOptions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default
|
||||||
|
/// </summary>
|
||||||
|
None = 0
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// Try to evaluate a templated value.
|
///// Replace boolean string value to a real boolean value. (This is used by default to maintain backward compatibility.)
|
||||||
/// In case this is valid, return the value, else fallback to the parse behavior.
|
///// </summary>
|
||||||
/// </summary>
|
//Bool = 0b00000001,
|
||||||
Evaluate = 1,
|
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// Parse templated string to a templated string.
|
///// Replace integer string value to a real integer value.
|
||||||
/// (keep a templated string value as string value).
|
///// </summary>
|
||||||
/// </summary>
|
//Integer = 0b00000010,
|
||||||
Parse = 2
|
|
||||||
|
///// <summary>
|
||||||
|
///// Replace long string value to a real long value.
|
||||||
|
///// </summary>
|
||||||
|
//Long = 0b00000100,
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// Replace all string values to a real values.
|
||||||
|
///// </summary>
|
||||||
|
//All = Bool | Integer | Long
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,22 +1,23 @@
|
|||||||
namespace WireMock.Types;
|
namespace WireMock.Types
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The ResponseMessage Transformers
|
|
||||||
/// </summary>
|
|
||||||
public enum TransformerType
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/Handlebars-Net/Handlebars.Net
|
/// The ResponseMessage Transformers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Handlebars,
|
public enum TransformerType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// https://github.com/Handlebars-Net/Handlebars.Net
|
||||||
|
/// </summary>
|
||||||
|
Handlebars,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/scriban/scriban : default
|
/// https://github.com/scriban/scriban : default
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Scriban,
|
Scriban,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/scriban/scriban : DotLiquid
|
/// https://github.com/scriban/scriban : DotLiquid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ScribanDotLiquid
|
ScribanDotLiquid
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<Description>Commonly used models, enumerations and types.</Description>
|
<Description>Commonly used models, enumerations and types.</Description>
|
||||||
<AssemblyTitle>WireMock.Net.Abstractions</AssemblyTitle>
|
<AssemblyTitle>WireMock.Net.Abstractions</AssemblyTitle>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net45;net451;net461;netstandard1.0;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>net45;net451;netstandard1.0;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<NoWarn>$(NoWarn);1591;8603</NoWarn>
|
<NoWarn>$(NoWarn);1591;8603</NoWarn>
|
||||||
<AssemblyName>WireMock.Net.Abstractions</AssemblyName>
|
<AssemblyName>WireMock.Net.Abstractions</AssemblyName>
|
||||||
@@ -31,26 +31,16 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
|
|
||||||
<!-- See also https://mstack.nl/blog/20210801-source-generators -->
|
<!-- See also https://mstack.nl/blog/20210801-source-generators -->
|
||||||
<PackageReference Include="FluentBuilder" Version="0.7.0">
|
<PackageReference Include="FluentBuilder" Version="0.5.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) and '$(TargetFramework)' != 'netstandard1.0'">
|
|
||||||
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
|
|
||||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net46" Version="1.0.2">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<!--<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
|
<!--<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
|
||||||
<PackageReference Include="Nullable" Version="1.2.1">
|
<PackageReference Include="Nullable" Version="1.2.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -154,8 +154,8 @@ internal class CSharpCodeMatcher : ICSharpCodeMatcher
|
|||||||
throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper", ex);
|
throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif (NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP3_1 || NET5_0 || NET6_0 || NET7_0)
|
#elif (NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP3_1 || NET5_0 || NET6_0)
|
||||||
Assembly assembly;
|
Assembly assembly;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
assembly = CSScriptLib.CSScript.Evaluator.CompileCode(source);
|
assembly = CSScriptLib.CSScript.Evaluator.CompileCode(source);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<Description>A CSharpCodeMatcher which can be used to match WireMock.Net Requests using C# code.</Description>
|
<Description>A CSharpCodeMatcher which can be used to match WireMock.Net Requests using C# code.</Description>
|
||||||
<AssemblyTitle>WireMock.Net.Matchers.CSharpCode</AssemblyTitle>
|
<AssemblyTitle>WireMock.Net.Matchers.CSharpCode</AssemblyTitle>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>wiremock;matchers;matcher;csharp;csharpcode</PackageTags>
|
<PackageTags>wiremock;matchers;matcher;csharp;csharpcode</PackageTags>
|
||||||
<RootNamespace>WireMock</RootNamespace>
|
<RootNamespace>WireMock</RootNamespace>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<Target Name="CheckIfShouldKillVBCSCompiler" />
|
<Target Name="CheckIfShouldKillVBCSCompiler" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
|
|
||||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<PackageReference Include="CS-Script" Version="3.30.3" />
|
<PackageReference Include="CS-Script" Version="3.30.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0'">
|
||||||
<PackageReference Include="CS-Script" Version="4.4.2" />
|
<PackageReference Include="CS-Script" Version="4.4.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="RamlToOpenApiConverter" Version="0.6.1" />
|
<PackageReference Include="RamlToOpenApiConverter" Version="0.6.1" />
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.17" />
|
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.16" />
|
||||||
<PackageReference Include="Stef.Validation" Version="0.1.1" />
|
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Description>Lightweight StandAlone Http Mocking Server for .Net.</Description>
|
<Description>Lightweight StandAlone Http Mocking Server for .Net.</Description>
|
||||||
<AssemblyTitle>WireMock.Net.StandAlone</AssemblyTitle>
|
<AssemblyTitle>WireMock.Net.StandAlone</AssemblyTitle>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<AssemblyName>WireMock.Net.StandAlone</AssemblyName>
|
<AssemblyName>WireMock.Net.StandAlone</AssemblyName>
|
||||||
<PackageId>WireMock.Net.StandAlone</PackageId>
|
<PackageId>WireMock.Net.StandAlone</PackageId>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="Stef.Validation" Version="0.1.1" />
|
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
||||||
<PackageReference Include="xUnit.abstractions" Version="2.0.3" />
|
<PackageReference Include="xUnit.abstractions" Version="2.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ internal static class HttpClientBuilder
|
|||||||
{
|
{
|
||||||
public static HttpClient Build(HttpClientSettings settings)
|
public static HttpClient Build(HttpClientSettings settings)
|
||||||
{
|
{
|
||||||
#if NETSTANDARD || NETCOREAPP3_1 || NET5_0 || NET6_0 || NET7_0
|
#if NETSTANDARD || NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
var handler = new HttpClientHandler
|
var handler = new HttpClientHandler
|
||||||
{
|
{
|
||||||
CheckCertificateRevocationList = false,
|
CheckCertificateRevocationList = false,
|
||||||
|
|||||||
@@ -51,14 +51,14 @@ internal class WebhookSender
|
|||||||
switch (webhookRequest.TransformerType)
|
switch (webhookRequest.TransformerType)
|
||||||
{
|
{
|
||||||
case TransformerType.Handlebars:
|
case TransformerType.Handlebars:
|
||||||
var factoryHandlebars = new HandlebarsContextFactory(_settings);
|
var factoryHandlebars = new HandlebarsContextFactory(_settings.FileSystemHandler, _settings.HandlebarsRegistrationCallback);
|
||||||
transformer = new Transformer(_settings, factoryHandlebars);
|
transformer = new Transformer(factoryHandlebars);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TransformerType.Scriban:
|
case TransformerType.Scriban:
|
||||||
case TransformerType.ScribanDotLiquid:
|
case TransformerType.ScribanDotLiquid:
|
||||||
var factoryDotLiquid = new ScribanContextFactory(_settings.FileSystemHandler, webhookRequest.TransformerType);
|
var factoryDotLiquid = new ScribanContextFactory(_settings.FileSystemHandler, webhookRequest.TransformerType);
|
||||||
transformer = new Transformer(_settings, factoryDotLiquid);
|
transformer = new Transformer(factoryDotLiquid);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -17,11 +17,6 @@ public interface IMapping
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Guid Guid { get; }
|
Guid Guid { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The datetime when this mapping was created or updated.
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? UpdatedAt { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the TimeSettings (Start, End and TTL).
|
/// Gets the TimeSettings (Start, End and TTL).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ public class Mapping : IMapping
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public Guid Guid { get; }
|
public Guid Guid { get; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public DateTime? UpdatedAt { get; set; }
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string? Title { get; }
|
public string? Title { get; }
|
||||||
|
|
||||||
@@ -76,7 +73,6 @@ public class Mapping : IMapping
|
|||||||
/// Initializes a new instance of the <see cref="Mapping"/> class.
|
/// Initializes a new instance of the <see cref="Mapping"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="guid">The unique identifier.</param>
|
/// <param name="guid">The unique identifier.</param>
|
||||||
/// <param name="updatedAt">The datetime when this mapping was created.</param>
|
|
||||||
/// <param name="title">The unique title (can be null).</param>
|
/// <param name="title">The unique title (can be null).</param>
|
||||||
/// <param name="description">The description (can be null).</param>
|
/// <param name="description">The description (can be null).</param>
|
||||||
/// <param name="path">The full file path from this mapping title (can be null).</param>
|
/// <param name="path">The full file path from this mapping title (can be null).</param>
|
||||||
@@ -93,7 +89,6 @@ public class Mapping : IMapping
|
|||||||
/// <param name="timeSettings">The TimeSettings. [Optional]</param>
|
/// <param name="timeSettings">The TimeSettings. [Optional]</param>
|
||||||
public Mapping(
|
public Mapping(
|
||||||
Guid guid,
|
Guid guid,
|
||||||
DateTime updatedAt,
|
|
||||||
string? title,
|
string? title,
|
||||||
string? description,
|
string? description,
|
||||||
string? path,
|
string? path,
|
||||||
@@ -110,7 +105,6 @@ public class Mapping : IMapping
|
|||||||
ITimeSettings? timeSettings)
|
ITimeSettings? timeSettings)
|
||||||
{
|
{
|
||||||
Guid = guid;
|
Guid = guid;
|
||||||
UpdatedAt = updatedAt;
|
|
||||||
Title = title;
|
Title = title;
|
||||||
Description = description;
|
Description = description;
|
||||||
Path = path;
|
Path = path;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class RequestMessageBodyMatcher : IRequestMatcher
|
|||||||
/// Initializes a new instance of the <see cref="RequestMessageBodyMatcher"/> class.
|
/// Initializes a new instance of the <see cref="RequestMessageBodyMatcher"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="func">The function.</param>
|
/// <param name="func">The function.</param>
|
||||||
public RequestMessageBodyMatcher(Func<IBodyData?, bool> func)
|
public RequestMessageBodyMatcher(Func<IBodyData, bool> func)
|
||||||
{
|
{
|
||||||
BodyDataFunc = Guard.NotNull(func);
|
BodyDataFunc = Guard.NotNull(func);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,7 @@ public class RequestMessageParamMatcher : IRequestMatcher
|
|||||||
/// <param name="key">The key.</param>
|
/// <param name="key">The key.</param>
|
||||||
/// <param name="ignoreCase">Defines if the key should be matched using case-ignore.</param>
|
/// <param name="ignoreCase">Defines if the key should be matched using case-ignore.</param>
|
||||||
/// <param name="values">The values.</param>
|
/// <param name="values">The values.</param>
|
||||||
public RequestMessageParamMatcher(MatchBehaviour matchBehaviour, string key, bool ignoreCase, params string[]? values) :
|
public RequestMessageParamMatcher(MatchBehaviour matchBehaviour, string key, bool ignoreCase, string[]? values) : this(matchBehaviour, key, ignoreCase, values?.Select(value => new ExactMatcher(matchBehaviour, ignoreCase, false, MatchOperator.And, value)).Cast<IStringMatcher>().ToArray())
|
||||||
this(matchBehaviour, key, ignoreCase, values?.Select(value => new ExactMatcher(matchBehaviour, ignoreCase, false, MatchOperator.And, value)).Cast<IStringMatcher>().ToArray())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +64,7 @@ public class RequestMessageParamMatcher : IRequestMatcher
|
|||||||
/// <param name="key">The key.</param>
|
/// <param name="key">The key.</param>
|
||||||
/// <param name="ignoreCase">Defines if the key should be matched using case-ignore.</param>
|
/// <param name="ignoreCase">Defines if the key should be matched using case-ignore.</param>
|
||||||
/// <param name="matchers">The matchers.</param>
|
/// <param name="matchers">The matchers.</param>
|
||||||
public RequestMessageParamMatcher(MatchBehaviour matchBehaviour, string key, bool ignoreCase, params IStringMatcher[]? matchers)
|
public RequestMessageParamMatcher(MatchBehaviour matchBehaviour, string key, bool ignoreCase, IStringMatcher[]? matchers)
|
||||||
{
|
{
|
||||||
MatchBehaviour = matchBehaviour;
|
MatchBehaviour = matchBehaviour;
|
||||||
Key = Guard.NotNull(key);
|
Key = Guard.NotNull(key);
|
||||||
@@ -96,7 +95,7 @@ public class RequestMessageParamMatcher : IRequestMatcher
|
|||||||
return MatchScores.ToScore(requestMessage.Query != null && Funcs.Any(f => f(requestMessage.Query)));
|
return MatchScores.ToScore(requestMessage.Query != null && Funcs.Any(f => f(requestMessage.Query)));
|
||||||
}
|
}
|
||||||
|
|
||||||
var valuesPresentInRequestMessage = ((RequestMessage)requestMessage).GetParameter(Key, IgnoreCase ?? false);
|
var valuesPresentInRequestMessage = ((RequestMessage)requestMessage).GetParameter(Key!, IgnoreCase ?? false);
|
||||||
if (valuesPresentInRequestMessage == null)
|
if (valuesPresentInRequestMessage == null)
|
||||||
{
|
{
|
||||||
// Key is not present at all, just return Mismatch
|
// Key is not present at all, just return Mismatch
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if NETCOREAPP3_1 || NET5_0 || NET6_0 || NET7_0
|
#if NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||||
using Microsoft.AspNetCore.Server.Kestrel.Https;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using CertificateLoader = WireMock.HttpsCertificate.CertificateLoader;
|
using WireMock.HttpsCertificate;
|
||||||
|
|
||||||
namespace WireMock.Owin
|
namespace WireMock.Owin
|
||||||
{
|
{
|
||||||
@@ -27,25 +26,21 @@ namespace WireMock.Owin
|
|||||||
{
|
{
|
||||||
kestrelOptions.ListenAnyIP(urlDetail.Port, listenOptions =>
|
kestrelOptions.ListenAnyIP(urlDetail.Port, listenOptions =>
|
||||||
{
|
{
|
||||||
listenOptions.UseHttps(options =>
|
if (wireMockMiddlewareOptions.CustomCertificateDefined)
|
||||||
{
|
{
|
||||||
if (wireMockMiddlewareOptions.CustomCertificateDefined)
|
listenOptions.UseHttps(CertificateLoader.LoadCertificate(
|
||||||
{
|
wireMockMiddlewareOptions.X509StoreName,
|
||||||
options.ServerCertificate = CertificateLoader.LoadCertificate(
|
wireMockMiddlewareOptions.X509StoreLocation,
|
||||||
wireMockMiddlewareOptions.X509StoreName,
|
wireMockMiddlewareOptions.X509ThumbprintOrSubjectName,
|
||||||
wireMockMiddlewareOptions.X509StoreLocation,
|
wireMockMiddlewareOptions.X509CertificateFilePath,
|
||||||
wireMockMiddlewareOptions.X509ThumbprintOrSubjectName,
|
wireMockMiddlewareOptions.X509CertificatePassword,
|
||||||
wireMockMiddlewareOptions.X509CertificateFilePath,
|
urlDetail.Host)
|
||||||
wireMockMiddlewareOptions.X509CertificatePassword,
|
);
|
||||||
urlDetail.Host);
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
options.ClientCertificateMode = (ClientCertificateMode) wireMockMiddlewareOptions.ClientCertificateMode;
|
listenOptions.UseHttps();
|
||||||
if (wireMockMiddlewareOptions.AcceptAnyClientCertificate)
|
}
|
||||||
{
|
|
||||||
options.ClientCertificateValidation = (_, _, _) => true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Server.Kestrel;
|
using Microsoft.AspNetCore.Server.Kestrel;
|
||||||
using Microsoft.AspNetCore.Server.Kestrel.Https;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using WireMock.HttpsCertificate;
|
using WireMock.HttpsCertificate;
|
||||||
@@ -24,22 +23,21 @@ internal partial class AspNetCoreSelfHost
|
|||||||
{
|
{
|
||||||
if (urlDetail.IsHttps)
|
if (urlDetail.IsHttps)
|
||||||
{
|
{
|
||||||
options.UseHttps(new HttpsConnectionFilterOptions
|
if (wireMockMiddlewareOptions.CustomCertificateDefined)
|
||||||
{
|
{
|
||||||
ServerCertificate = wireMockMiddlewareOptions.CustomCertificateDefined
|
options.UseHttps(CertificateLoader.LoadCertificate(
|
||||||
? CertificateLoader.LoadCertificate(
|
wireMockMiddlewareOptions.X509StoreName,
|
||||||
wireMockMiddlewareOptions.X509StoreName,
|
wireMockMiddlewareOptions.X509StoreLocation,
|
||||||
wireMockMiddlewareOptions.X509StoreLocation,
|
wireMockMiddlewareOptions.X509ThumbprintOrSubjectName,
|
||||||
wireMockMiddlewareOptions.X509ThumbprintOrSubjectName,
|
wireMockMiddlewareOptions.X509CertificateFilePath,
|
||||||
wireMockMiddlewareOptions.X509CertificateFilePath,
|
wireMockMiddlewareOptions.X509CertificatePassword,
|
||||||
wireMockMiddlewareOptions.X509CertificatePassword,
|
urlDetail.Host)
|
||||||
urlDetail.Host)
|
);
|
||||||
: PublicCertificateHelper.GetX509Certificate2(),
|
}
|
||||||
ClientCertificateMode = (ClientCertificateMode) wireMockMiddlewareOptions.ClientCertificateMode,
|
else
|
||||||
ClientCertificateValidation = wireMockMiddlewareOptions.AcceptAnyClientCertificate
|
{
|
||||||
? (_, _, _) => true
|
options.UseHttps(PublicCertificateHelper.GetX509Certificate2());
|
||||||
: null,
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace WireMock.Owin
|
|||||||
services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>();
|
services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>();
|
||||||
services.AddSingleton<IOwinResponseMapper, OwinResponseMapper>();
|
services.AddSingleton<IOwinResponseMapper, OwinResponseMapper>();
|
||||||
|
|
||||||
#if NETCOREAPP3_1 || NET5_0 || NET6_0 || NET7_0
|
#if NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
AddCors(services);
|
AddCors(services);
|
||||||
#endif
|
#endif
|
||||||
_wireMockMiddlewareOptions.AdditionalServiceRegistration?.Invoke(services);
|
_wireMockMiddlewareOptions.AdditionalServiceRegistration?.Invoke(services);
|
||||||
@@ -78,7 +78,7 @@ namespace WireMock.Owin
|
|||||||
{
|
{
|
||||||
appBuilder.UseMiddleware<GlobalExceptionMiddleware>();
|
appBuilder.UseMiddleware<GlobalExceptionMiddleware>();
|
||||||
|
|
||||||
#if NETCOREAPP3_1 || NET5_0 || NET6_0 || NET7_0
|
#if NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
UseCors(appBuilder);
|
UseCors(appBuilder);
|
||||||
#endif
|
#endif
|
||||||
_wireMockMiddlewareOptions.PreWireMockMiddlewareInit?.Invoke(appBuilder);
|
_wireMockMiddlewareOptions.PreWireMockMiddlewareInit?.Invoke(appBuilder);
|
||||||
@@ -137,8 +137,6 @@ namespace WireMock.Owin
|
|||||||
_logger.Info("Server using .NET 5.0");
|
_logger.Info("Server using .NET 5.0");
|
||||||
#elif NET6_0
|
#elif NET6_0
|
||||||
_logger.Info("Server using .NET 6.0");
|
_logger.Info("Server using .NET 6.0");
|
||||||
#elif NET7_0
|
|
||||||
_logger.Info("Server using .NET 7.0");
|
|
||||||
#elif NET46
|
#elif NET46
|
||||||
_logger.Info("Server using .NET Framework 4.6.1 or higher");
|
_logger.Info("Server using .NET Framework 4.6.1 or higher");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -42,10 +42,6 @@ internal interface IWireMockMiddlewareOptions
|
|||||||
Action<IServiceCollection>? AdditionalServiceRegistration { get; set; }
|
Action<IServiceCollection>? AdditionalServiceRegistration { get; set; }
|
||||||
|
|
||||||
CorsPolicyOptions? CorsPolicyOptions { get; set; }
|
CorsPolicyOptions? CorsPolicyOptions { get; set; }
|
||||||
|
|
||||||
ClientCertificateMode ClientCertificateMode { get; set; }
|
|
||||||
|
|
||||||
bool AcceptAnyClientCertificate { get; set; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IFileSystemHandler? FileSystemHandler { get; set; }
|
IFileSystemHandler? FileSystemHandler { get; set; }
|
||||||
|
|||||||
@@ -68,21 +68,7 @@ namespace WireMock.Owin.Mappers
|
|||||||
body = await BodyParser.ParseAsync(bodyParserSettings).ConfigureAwait(false);
|
body = await BodyParser.ParseAsync(bodyParserSettings).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RequestMessage(
|
return new RequestMessage(urlDetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow };
|
||||||
options,
|
|
||||||
urlDetails,
|
|
||||||
method,
|
|
||||||
clientIP,
|
|
||||||
body,
|
|
||||||
headers,
|
|
||||||
cookies
|
|
||||||
#if USE_ASPNETCORE
|
|
||||||
, await request.HttpContext.Connection.GetClientCertificateAsync()
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
DateTime = DateTime.UtcNow
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request)
|
private static (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request)
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ internal class MappingMatcher : IMappingMatcher
|
|||||||
|
|
||||||
public MappingMatcher(IWireMockMiddlewareOptions options)
|
public MappingMatcher(IWireMockMiddlewareOptions options)
|
||||||
{
|
{
|
||||||
_options = Guard.NotNull(options);
|
Guard.NotNull(options, nameof(options));
|
||||||
|
|
||||||
|
_options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
public (MappingMatcherResult? Match, MappingMatcherResult? Partial) FindBestMatch(RequestMessage request)
|
public (MappingMatcherResult? Match, MappingMatcherResult? Partial) FindBestMatch(RequestMessage request)
|
||||||
{
|
{
|
||||||
Guard.NotNull(request);
|
|
||||||
|
|
||||||
var possibleMappings = new List<MappingMatcherResult>();
|
var possibleMappings = new List<MappingMatcherResult>();
|
||||||
|
|
||||||
foreach (var mapping in _options.Mappings.Values.Where(m => m.TimeSettings.IsValid()))
|
foreach (var mapping in _options.Mappings.Values.Where(m => m.TimeSettings.IsValid()))
|
||||||
@@ -41,7 +41,8 @@ internal class MappingMatcher : IMappingMatcher
|
|||||||
|
|
||||||
var partialMappings = possibleMappings
|
var partialMappings = possibleMappings
|
||||||
.Where(pm => (pm.Mapping.IsAdminInterface && pm.RequestMatchResult.IsPerfectMatch) || !pm.Mapping.IsAdminInterface)
|
.Where(pm => (pm.Mapping.IsAdminInterface && pm.RequestMatchResult.IsPerfectMatch) || !pm.Mapping.IsAdminInterface)
|
||||||
.OrderBy(m => m.RequestMatchResult).ThenBy(m => m.Mapping.Priority).ThenByDescending(m => m.Mapping.UpdatedAt)
|
.OrderBy(m => m.RequestMatchResult)
|
||||||
|
.ThenBy(m => m.Mapping.Priority)
|
||||||
.ToList();
|
.ToList();
|
||||||
var partialMatch = partialMappings.FirstOrDefault(pm => pm.RequestMatchResult.AverageTotalScore > 0.0);
|
var partialMatch = partialMappings.FirstOrDefault(pm => pm.RequestMatchResult.AverageTotalScore > 0.0);
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ internal class MappingMatcher : IMappingMatcher
|
|||||||
|
|
||||||
var match = possibleMappings
|
var match = possibleMappings
|
||||||
.Where(m => m.RequestMatchResult.IsPerfectMatch)
|
.Where(m => m.RequestMatchResult.IsPerfectMatch)
|
||||||
.OrderBy(m => m.Mapping.Priority).ThenBy(m => m.RequestMatchResult).ThenByDescending(m => m.Mapping.UpdatedAt)
|
.OrderBy(m => m.Mapping.Priority).ThenBy(m => m.RequestMatchResult)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
return (match, partialMatch);
|
return (match, partialMatch);
|
||||||
|
|||||||
@@ -269,55 +269,29 @@ namespace WireMock.Owin
|
|||||||
{
|
{
|
||||||
_options.Logger.DebugRequestResponse(_logEntryMapper.Map(entry), entry.RequestMessage.Path.StartsWith("/__admin/"));
|
_options.Logger.DebugRequestResponse(_logEntryMapper.Map(entry), entry.RequestMessage.Path.StartsWith("/__admin/"));
|
||||||
|
|
||||||
// If addRequest is set to true and MaxRequestLogCount is null or does have a value greater than 0, try to add a new request log.
|
if (addRequest)
|
||||||
if (addRequest && _options.MaxRequestLogCount is null or > 0)
|
|
||||||
{
|
{
|
||||||
TryAddLogEntry(entry);
|
_options.LogEntries.Add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// In case MaxRequestLogCount has a value greater than 0, try to delete existing request logs based on the count.
|
if (_options.MaxRequestLogCount != null)
|
||||||
if (_options.MaxRequestLogCount is > 0)
|
|
||||||
{
|
{
|
||||||
var logEntries = _options.LogEntries.ToList();
|
var logEntries = _options.LogEntries.ToList();
|
||||||
foreach (var logEntry in logEntries.OrderBy(le => le.RequestMessage.DateTime).Take(logEntries.Count - _options.MaxRequestLogCount.Value))
|
foreach (var logEntry in logEntries.OrderBy(le => le.RequestMessage.DateTime).Take(logEntries.Count - _options.MaxRequestLogCount.Value))
|
||||||
{
|
{
|
||||||
TryRemoveLogEntry(logEntry);
|
_options.LogEntries.Remove(logEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// In case RequestLogExpirationDuration has a value greater than 0, try to delete existing request logs based on the date.
|
if (_options.RequestLogExpirationDuration != null)
|
||||||
if (_options.RequestLogExpirationDuration is > 0)
|
|
||||||
{
|
{
|
||||||
var checkTime = DateTime.UtcNow.AddHours(-_options.RequestLogExpirationDuration.Value);
|
var checkTime = DateTime.UtcNow.AddHours(-_options.RequestLogExpirationDuration.Value);
|
||||||
|
|
||||||
foreach (var logEntry in _options.LogEntries.ToList().Where(le => le.RequestMessage.DateTime < checkTime))
|
foreach (var logEntry in _options.LogEntries.ToList().Where(le => le.RequestMessage.DateTime < checkTime))
|
||||||
{
|
{
|
||||||
TryRemoveLogEntry(logEntry);
|
_options.LogEntries.Remove(logEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TryAddLogEntry(LogEntry logEntry)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_options.LogEntries.Add(logEntry);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// Ignore exception (can happen during stress testing)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void TryRemoveLogEntry(LogEntry logEntry)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_options.LogEntries.Remove(logEntry);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// Ignore exception (can happen during stress testing)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,11 +42,6 @@ internal class WireMockMiddlewareOptions : IWireMockMiddlewareOptions
|
|||||||
public Action<IServiceCollection>? AdditionalServiceRegistration { get; set; }
|
public Action<IServiceCollection>? AdditionalServiceRegistration { get; set; }
|
||||||
|
|
||||||
public CorsPolicyOptions? CorsPolicyOptions { get; set; }
|
public CorsPolicyOptions? CorsPolicyOptions { get; set; }
|
||||||
|
|
||||||
public ClientCertificateMode ClientCertificateMode { get; set; }
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public bool AcceptAnyClientCertificate { get; set; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <inheritdoc cref="IWireMockMiddlewareOptions.FileSystemHandler"/>
|
/// <inheritdoc cref="IWireMockMiddlewareOptions.FileSystemHandler"/>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ internal class ProxyHelper
|
|||||||
public ProxyHelper(WireMockServerSettings settings)
|
public ProxyHelper(WireMockServerSettings settings)
|
||||||
{
|
{
|
||||||
_settings = Guard.NotNull(settings);
|
_settings = Guard.NotNull(settings);
|
||||||
_proxyMappingConverter = new ProxyMappingConverter(settings, new GuidUtils(), new DateTimeUtils());
|
_proxyMappingConverter = new ProxyMappingConverter(settings, new GuidUtils());
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<(IResponseMessage Message, IMapping? Mapping)> SendAsync(
|
public async Task<(IResponseMessage Message, IMapping? Mapping)> SendAsync(
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
#if USE_ASPNETCORE
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
#endif
|
|
||||||
using Stef.Validation;
|
using Stef.Validation;
|
||||||
using WireMock.Models;
|
using WireMock.Models;
|
||||||
using WireMock.Owin;
|
using WireMock.Owin;
|
||||||
@@ -95,11 +92,6 @@ public class RequestMessage : IRequestMessage
|
|||||||
/// <inheritdoc cref="IRequestMessage.Origin" />
|
/// <inheritdoc cref="IRequestMessage.Origin" />
|
||||||
public string Origin { get; }
|
public string Origin { get; }
|
||||||
|
|
||||||
#if USE_ASPNETCORE
|
|
||||||
/// <inheritdoc cref="IRequestMessage.ClientCertificate" />
|
|
||||||
public X509Certificate2? ClientCertificate { get; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used for Unit Testing
|
/// Used for Unit Testing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -123,20 +115,13 @@ public class RequestMessage : IRequestMessage
|
|||||||
/// <param name="bodyData">The BodyData.</param>
|
/// <param name="bodyData">The BodyData.</param>
|
||||||
/// <param name="headers">The headers.</param>
|
/// <param name="headers">The headers.</param>
|
||||||
/// <param name="cookies">The cookies.</param>
|
/// <param name="cookies">The cookies.</param>
|
||||||
#if USE_ASPNETCORE
|
|
||||||
/// <param name="clientCertificate">The client certificate</param>
|
|
||||||
#endif
|
|
||||||
internal RequestMessage(
|
internal RequestMessage(
|
||||||
IWireMockMiddlewareOptions? options,
|
IWireMockMiddlewareOptions? options,
|
||||||
UrlDetails urlDetails, string method,
|
UrlDetails urlDetails, string method,
|
||||||
string clientIP,
|
string clientIP,
|
||||||
IBodyData? bodyData = null,
|
IBodyData? bodyData = null,
|
||||||
IDictionary<string, string[]>? headers = null,
|
IDictionary<string, string[]>? headers = null,
|
||||||
IDictionary<string, string>? cookies = null
|
IDictionary<string, string>? cookies = null)
|
||||||
#if USE_ASPNETCORE
|
|
||||||
, X509Certificate2? clientCertificate = null
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Guard.NotNull(urlDetails, nameof(urlDetails));
|
Guard.NotNull(urlDetails, nameof(urlDetails));
|
||||||
Guard.NotNull(method, nameof(method));
|
Guard.NotNull(method, nameof(method));
|
||||||
@@ -171,9 +156,6 @@ public class RequestMessage : IRequestMessage
|
|||||||
Cookies = cookies;
|
Cookies = cookies;
|
||||||
RawQuery = urlDetails.Url.Query;
|
RawQuery = urlDetails.Url.Query;
|
||||||
Query = QueryStringParser.Parse(RawQuery, options?.QueryParameterMultipleValueSupport);
|
Query = QueryStringParser.Parse(RawQuery, options?.QueryParameterMultipleValueSupport);
|
||||||
#if USE_ASPNETCORE
|
|
||||||
ClientCertificate = clientCertificate;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ public interface ITransformResponseBuilder : IDelayResponseBuilder
|
|||||||
/// <returns>
|
/// <returns>
|
||||||
/// The <see cref="IResponseBuilder"/>.
|
/// The <see cref="IResponseBuilder"/>.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
IResponseBuilder WithTransformer(TransformerType transformerType = TransformerType.Handlebars, bool transformContentFromBodyAsFile = false, ReplaceNodeOptions options = ReplaceNodeOptions.Evaluate);
|
IResponseBuilder WithTransformer(TransformerType transformerType = TransformerType.Handlebars, bool transformContentFromBodyAsFile = false, ReplaceNodeOptions options = ReplaceNodeOptions.None);
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@ public partial class Response : IResponseBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IResponseBuilder WithTransformer(TransformerType transformerType, bool transformContentFromBodyAsFile = false, ReplaceNodeOptions options = ReplaceNodeOptions.Evaluate)
|
public IResponseBuilder WithTransformer(TransformerType transformerType, bool transformContentFromBodyAsFile = false, ReplaceNodeOptions options = ReplaceNodeOptions.None)
|
||||||
{
|
{
|
||||||
UseTransformer = true;
|
UseTransformer = true;
|
||||||
TransformerType = transformerType;
|
TransformerType = transformerType;
|
||||||
@@ -314,14 +314,14 @@ public partial class Response : IResponseBuilder
|
|||||||
switch (TransformerType)
|
switch (TransformerType)
|
||||||
{
|
{
|
||||||
case TransformerType.Handlebars:
|
case TransformerType.Handlebars:
|
||||||
var factoryHandlebars = new HandlebarsContextFactory(settings);
|
var factoryHandlebars = new HandlebarsContextFactory(settings.FileSystemHandler, settings.HandlebarsRegistrationCallback);
|
||||||
responseMessageTransformer = new Transformer(settings, factoryHandlebars);
|
responseMessageTransformer = new Transformer(factoryHandlebars);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TransformerType.Scriban:
|
case TransformerType.Scriban:
|
||||||
case TransformerType.ScribanDotLiquid:
|
case TransformerType.ScribanDotLiquid:
|
||||||
var factoryDotLiquid = new ScribanContextFactory(settings.FileSystemHandler, TransformerType);
|
var factoryDotLiquid = new ScribanContextFactory(settings.FileSystemHandler, TransformerType);
|
||||||
responseMessageTransformer = new Transformer(settings, factoryDotLiquid);
|
responseMessageTransformer = new Transformer(factoryDotLiquid);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ internal class MappingConverter
|
|||||||
var mappingModel = new MappingModel
|
var mappingModel = new MappingModel
|
||||||
{
|
{
|
||||||
Guid = mapping.Guid,
|
Guid = mapping.Guid,
|
||||||
UpdatedAt = mapping.UpdatedAt,
|
|
||||||
TimeSettings = TimeSettingsMapper.Map(mapping.TimeSettings),
|
TimeSettings = TimeSettingsMapper.Map(mapping.TimeSettings),
|
||||||
Title = mapping.Title,
|
Title = mapping.Title,
|
||||||
Description = mapping.Description,
|
Description = mapping.Description,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
using Stef.Validation;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Stef.Validation;
|
|
||||||
using WireMock.Constants;
|
using WireMock.Constants;
|
||||||
using WireMock.Matchers;
|
using WireMock.Matchers;
|
||||||
using WireMock.Matchers.Request;
|
using WireMock.Matchers.Request;
|
||||||
@@ -17,13 +17,11 @@ internal class ProxyMappingConverter
|
|||||||
{
|
{
|
||||||
private readonly WireMockServerSettings _settings;
|
private readonly WireMockServerSettings _settings;
|
||||||
private readonly IGuidUtils _guidUtils;
|
private readonly IGuidUtils _guidUtils;
|
||||||
private readonly IDateTimeUtils _dateTimeUtils;
|
|
||||||
|
|
||||||
public ProxyMappingConverter(WireMockServerSettings settings, IGuidUtils guidUtils, IDateTimeUtils dateTimeUtils)
|
public ProxyMappingConverter(WireMockServerSettings settings, IGuidUtils guidUtils)
|
||||||
{
|
{
|
||||||
_settings = Guard.NotNull(settings);
|
_settings = Guard.NotNull(settings);
|
||||||
_guidUtils = Guard.NotNull(guidUtils);
|
_guidUtils = Guard.NotNull(guidUtils);
|
||||||
_dateTimeUtils = Guard.NotNull(dateTimeUtils);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMapping ToMapping(IMapping? mapping, ProxyAndRecordSettings proxyAndRecordSettings, IRequestMessage requestMessage, ResponseMessage responseMessage)
|
public IMapping ToMapping(IMapping? mapping, ProxyAndRecordSettings proxyAndRecordSettings, IRequestMessage requestMessage, ResponseMessage responseMessage)
|
||||||
@@ -164,7 +162,6 @@ internal class ProxyMappingConverter
|
|||||||
return new Mapping
|
return new Mapping
|
||||||
(
|
(
|
||||||
guid: _guidUtils.NewGuid(),
|
guid: _guidUtils.NewGuid(),
|
||||||
updatedAt: _dateTimeUtils.UtcNow,
|
|
||||||
title: title,
|
title: title,
|
||||||
description: description,
|
description: description,
|
||||||
path: null,
|
path: null,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ internal static class WebhookMapper
|
|||||||
|
|
||||||
if (!Enum.TryParse<ReplaceNodeOptions>(model.Request.TransformerReplaceNodeOptions, out var option))
|
if (!Enum.TryParse<ReplaceNodeOptions>(model.Request.TransformerReplaceNodeOptions, out var option))
|
||||||
{
|
{
|
||||||
option = ReplaceNodeOptions.Evaluate;
|
option = ReplaceNodeOptions.None;
|
||||||
}
|
}
|
||||||
webhook.Request.TransformerReplaceNodeOptions = option;
|
webhook.Request.TransformerReplaceNodeOptions = option;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,12 +29,10 @@ internal class RespondWithAProvider : IRespondWithAProvider
|
|||||||
private readonly IRequestMatcher _requestMatcher;
|
private readonly IRequestMatcher _requestMatcher;
|
||||||
private readonly WireMockServerSettings _settings;
|
private readonly WireMockServerSettings _settings;
|
||||||
private readonly bool _saveToFile;
|
private readonly bool _saveToFile;
|
||||||
private readonly IGuidUtils _guidUtils = new GuidUtils();
|
|
||||||
private readonly IDateTimeUtils _dateTimeUtils = new DateTimeUtils();
|
|
||||||
|
|
||||||
private bool _useWebhookFireAndForget;
|
private bool _useWebhookFireAndForget;
|
||||||
|
|
||||||
public Guid Guid { get; private set; }
|
public Guid Guid { get; private set; } = Guid.NewGuid();
|
||||||
|
|
||||||
public IWebhook[]? Webhooks { get; private set; }
|
public IWebhook[]? Webhooks { get; private set; }
|
||||||
|
|
||||||
@@ -47,19 +45,12 @@ internal class RespondWithAProvider : IRespondWithAProvider
|
|||||||
/// <param name="requestMatcher">The request matcher.</param>
|
/// <param name="requestMatcher">The request matcher.</param>
|
||||||
/// <param name="settings">The WireMockServerSettings.</param>
|
/// <param name="settings">The WireMockServerSettings.</param>
|
||||||
/// <param name="saveToFile">Optional boolean to indicate if this mapping should be saved as static mapping file.</param>
|
/// <param name="saveToFile">Optional boolean to indicate if this mapping should be saved as static mapping file.</param>
|
||||||
public RespondWithAProvider(
|
public RespondWithAProvider(RegistrationCallback registrationCallback, IRequestMatcher requestMatcher, WireMockServerSettings settings, bool saveToFile = false)
|
||||||
RegistrationCallback registrationCallback,
|
|
||||||
IRequestMatcher requestMatcher,
|
|
||||||
WireMockServerSettings settings,
|
|
||||||
bool saveToFile = false
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
_registrationCallback = Guard.NotNull(registrationCallback);
|
_registrationCallback = registrationCallback;
|
||||||
_requestMatcher = Guard.NotNull(requestMatcher);
|
_requestMatcher = requestMatcher;
|
||||||
_settings = Guard.NotNull(settings);
|
_settings = settings;
|
||||||
_saveToFile = Guard.NotNull(saveToFile);
|
_saveToFile = saveToFile;
|
||||||
|
|
||||||
Guid = _guidUtils.NewGuid();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -68,24 +59,7 @@ internal class RespondWithAProvider : IRespondWithAProvider
|
|||||||
/// <param name="provider">The provider.</param>
|
/// <param name="provider">The provider.</param>
|
||||||
public void RespondWith(IResponseProvider provider)
|
public void RespondWith(IResponseProvider provider)
|
||||||
{
|
{
|
||||||
var mapping = new Mapping(
|
_registrationCallback(new Mapping(Guid, _title, _description, _path, _settings, _requestMatcher, provider, _priority, _scenario, _executionConditionState, _nextState, _timesInSameState, Webhooks, _useWebhookFireAndForget, TimeSettings), _saveToFile);
|
||||||
Guid,
|
|
||||||
_dateTimeUtils.UtcNow,
|
|
||||||
_title,
|
|
||||||
_description,
|
|
||||||
_path,
|
|
||||||
_settings,
|
|
||||||
_requestMatcher,
|
|
||||||
provider,
|
|
||||||
_priority,
|
|
||||||
_scenario,
|
|
||||||
_executionConditionState,
|
|
||||||
_nextState,
|
|
||||||
_timesInSameState,
|
|
||||||
Webhooks,
|
|
||||||
_useWebhookFireAndForget,
|
|
||||||
TimeSettings);
|
|
||||||
_registrationCallback(mapping, _saveToFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -226,9 +226,7 @@ public partial class WireMockServer
|
|||||||
QueryParameterMultipleValueSupport = _settings.QueryParameterMultipleValueSupport,
|
QueryParameterMultipleValueSupport = _settings.QueryParameterMultipleValueSupport,
|
||||||
|
|
||||||
#if USE_ASPNETCORE
|
#if USE_ASPNETCORE
|
||||||
CorsPolicyOptions = _settings.CorsPolicyOptions?.ToString(),
|
CorsPolicyOptions = _settings.CorsPolicyOptions?.ToString()
|
||||||
ClientCertificateMode = _settings.ClientCertificateMode,
|
|
||||||
AcceptAnyClientCertificate = _settings.AcceptAnyClientCertificate
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -277,9 +275,6 @@ public partial class WireMockServer
|
|||||||
_settings.CorsPolicyOptions = corsPolicyOptions;
|
_settings.CorsPolicyOptions = corsPolicyOptions;
|
||||||
_options.CorsPolicyOptions = corsPolicyOptions;
|
_options.CorsPolicyOptions = corsPolicyOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
_options.ClientCertificateMode = _settings.ClientCertificateMode;
|
|
||||||
_options.AcceptAnyClientCertificate = _settings.AcceptAnyClientCertificate;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ResponseMessageBuilder.Create("Settings updated");
|
return ResponseMessageBuilder.Create("Settings updated");
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ public partial class WireMockServer
|
|||||||
|
|
||||||
if (!Enum.TryParse<ReplaceNodeOptions>(responseModel.TransformerReplaceNodeOptions, out var option))
|
if (!Enum.TryParse<ReplaceNodeOptions>(responseModel.TransformerReplaceNodeOptions, out var option))
|
||||||
{
|
{
|
||||||
option = ReplaceNodeOptions.Evaluate;
|
option = ReplaceNodeOptions.None;
|
||||||
}
|
}
|
||||||
responseBuilder = responseBuilder.WithTransformer(
|
responseBuilder = responseBuilder.WithTransformer(
|
||||||
transformerType,
|
transformerType,
|
||||||
|
|||||||
@@ -107,42 +107,25 @@ public partial class WireMockServer : IWireMockServer
|
|||||||
#region HttpClient
|
#region HttpClient
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a <see cref="HttpClient"/> which can be used to call this instance.
|
/// Create a <see cref="HttpClient"/> which can be used to call this instance.
|
||||||
/// <param name="handlers">
|
|
||||||
/// An ordered list of System.Net.Http.DelegatingHandler instances to be invoked
|
|
||||||
/// as an System.Net.Http.HttpRequestMessage travels from the System.Net.Http.HttpClient
|
|
||||||
/// to the network and an System.Net.Http.HttpResponseMessage travels from the network
|
|
||||||
/// back to System.Net.Http.HttpClient. The handlers are invoked in a top-down fashion.
|
|
||||||
/// That is, the first entry is invoked first for an outbound request message but
|
|
||||||
/// last for an inbound response message.
|
|
||||||
/// </param>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public HttpClient CreateClient(params DelegatingHandler[] handlers)
|
public HttpClient CreateClient()
|
||||||
{
|
{
|
||||||
if (!IsStarted)
|
if (!IsStarted)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException("Unable to create HttpClient because the service is not started.");
|
throw new InvalidOperationException("Unable to create HttpClient because the service is not started.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var client = HttpClientFactory2.Create(handlers);
|
var client = HttpClientFactory2.Create();
|
||||||
client.BaseAddress = new Uri(Url!);
|
client.BaseAddress = new Uri(Url!);
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create <see cref="HttpClient"/>s (one for each URL) which can be used to call this instance.
|
/// Create <see cref="HttpClient"/>s (one for each URL) which can be used to call this instance.
|
||||||
/// <param name="innerHandler">The inner handler represents the destination of the HTTP message channel.</param>
|
|
||||||
/// <param name="handlers">
|
|
||||||
/// An ordered list of System.Net.Http.DelegatingHandler instances to be invoked
|
|
||||||
/// as an System.Net.Http.HttpRequestMessage travels from the System.Net.Http.HttpClient
|
|
||||||
/// to the network and an System.Net.Http.HttpResponseMessage travels from the network
|
|
||||||
/// back to System.Net.Http.HttpClient. The handlers are invoked in a top-down fashion.
|
|
||||||
/// That is, the first entry is invoked first for an outbound request message but
|
|
||||||
/// last for an inbound response message.
|
|
||||||
/// </param>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public HttpClient[] CreateClients(HttpMessageHandler innerHandler, params DelegatingHandler[] handlers)
|
public HttpClient[] CreateClients()
|
||||||
{
|
{
|
||||||
if (!IsStarted)
|
if (!IsStarted)
|
||||||
{
|
{
|
||||||
@@ -151,7 +134,7 @@ public partial class WireMockServer : IWireMockServer
|
|||||||
|
|
||||||
return Urls.Select(url =>
|
return Urls.Select(url =>
|
||||||
{
|
{
|
||||||
var client = HttpClientFactory2.Create(innerHandler, handlers);
|
var client = HttpClientFactory2.Create();
|
||||||
client.BaseAddress = new Uri(url);
|
client.BaseAddress = new Uri(url);
|
||||||
return client;
|
return client;
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
@@ -331,8 +314,6 @@ public partial class WireMockServer : IWireMockServer
|
|||||||
#if USE_ASPNETCORE
|
#if USE_ASPNETCORE
|
||||||
_options.AdditionalServiceRegistration = _settings.AdditionalServiceRegistration;
|
_options.AdditionalServiceRegistration = _settings.AdditionalServiceRegistration;
|
||||||
_options.CorsPolicyOptions = _settings.CorsPolicyOptions;
|
_options.CorsPolicyOptions = _settings.CorsPolicyOptions;
|
||||||
_options.ClientCertificateMode = _settings.ClientCertificateMode;
|
|
||||||
_options.AcceptAnyClientCertificate = _settings.AcceptAnyClientCertificate;
|
|
||||||
|
|
||||||
_httpServer = new AspNetCoreSelfHost(_options, urlOptions);
|
_httpServer = new AspNetCoreSelfHost(_options, urlOptions);
|
||||||
#else
|
#else
|
||||||
@@ -543,10 +524,9 @@ public partial class WireMockServer : IWireMockServer
|
|||||||
|
|
||||||
private void RegisterMapping(IMapping mapping, bool saveToFile)
|
private void RegisterMapping(IMapping mapping, bool saveToFile)
|
||||||
{
|
{
|
||||||
// Check a mapping exists with the same Guid. If so, update the datetime and replace it.
|
// Check a mapping exists with the same Guid, if so, replace it.
|
||||||
if (_options.Mappings.ContainsKey(mapping.Guid))
|
if (_options.Mappings.ContainsKey(mapping.Guid))
|
||||||
{
|
{
|
||||||
mapping.UpdatedAt = DateTime.UtcNow;
|
|
||||||
_options.Mappings[mapping.Guid] = mapping;
|
_options.Mappings[mapping.Guid] = mapping;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -10,292 +10,272 @@ using WireMock.Logging;
|
|||||||
using WireMock.Matchers;
|
using WireMock.Matchers;
|
||||||
using WireMock.RegularExpressions;
|
using WireMock.RegularExpressions;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using System.Globalization;
|
|
||||||
#if USE_ASPNETCORE
|
#if USE_ASPNETCORE
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace WireMock.Settings;
|
namespace WireMock.Settings
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// WireMockServerSettings
|
|
||||||
/// </summary>
|
|
||||||
public class WireMockServerSettings
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the http port.
|
/// WireMockServerSettings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
public class WireMockServerSettings
|
||||||
public int? Port { get; set; }
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the use SSL.
|
|
||||||
/// </summary>
|
|
||||||
// ReSharper disable once InconsistentNaming
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? UseSSL { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines on which scheme (http/https) to host. (This overrides the <c>UseSSL</c> value).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public HostingScheme? HostingScheme { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets whether to start admin interface.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? StartAdminInterface { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets if the static mappings should be read at startup.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? ReadStaticMappings { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch the static mapping files + folder for changes when running.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? WatchStaticMappings { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A value indicating whether subdirectories within the static mappings path should be monitored.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? WatchStaticMappingsInSubdirectories { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets if the proxy and record settings.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public ProxyAndRecordSettings? ProxyAndRecordSettings { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the urls.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public string[]? Urls { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// StartTimeout
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public int StartTimeout { get; set; } = 10000;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Allow Partial Mapping (default set to false).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? AllowPartialMapping { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The username needed for __admin access.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public string? AdminUsername { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The password needed for __admin access.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public string? AdminPassword { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The AzureAD Tenant needed for __admin access.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public string? AdminAzureADTenant { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The AzureAD Audience / Resource for __admin access.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public string? AdminAzureADAudience { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The RequestLog expiration in hours (optional).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public int? RequestLogExpirationDuration { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The MaxRequestLog count (optional).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public int? MaxRequestLogCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Action which is called (with the IAppBuilder or IApplicationBuilder) before the internal WireMockMiddleware is initialized. [Optional]
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
[JsonIgnore]
|
|
||||||
public Action<object>? PreWireMockMiddlewareInit { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Action which is called (with the IAppBuilder or IApplicationBuilder) after the internal WireMockMiddleware is initialized. [Optional]
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
[JsonIgnore]
|
|
||||||
public Action<object>? PostWireMockMiddlewareInit { get; set; }
|
|
||||||
|
|
||||||
#if USE_ASPNETCORE
|
|
||||||
/// <summary>
|
|
||||||
/// Action which is called with IServiceCollection when ASP.NET Core DI is being configured. [Optional]
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
[JsonIgnore]
|
|
||||||
public Action<IServiceCollection>? AdditionalServiceRegistration { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Policies to use when using CORS. By default CORS is disabled. [Optional]
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public CorsPolicyOptions? CorsPolicyOptions { get; set; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The IWireMockLogger which logs Debug, Info, Warning or Error
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
[JsonIgnore]
|
|
||||||
public IWireMockLogger Logger { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Handler to interact with the file system to read and write static mapping files.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
[JsonIgnore]
|
|
||||||
public IFileSystemHandler FileSystemHandler { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Action which can be used to add additional Handlebars registrations. [Optional]
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
[JsonIgnore]
|
|
||||||
public Action<IHandlebars, IFileSystemHandler>? HandlebarsRegistrationCallback { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Allow the usage of CSharpCodeMatcher (default is not allowed).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? AllowCSharpCodeMatcher { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Allow a Body for all HTTP Methods. (default set to false).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? AllowBodyForAllHttpMethods { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Allow only a HttpStatus Code in the response which is defined. (default set to false).
|
|
||||||
/// - false : also null, 0, empty or invalid HttpStatus codes are allowed.
|
|
||||||
/// - true : only codes defined in <see cref="System.Net.HttpStatusCode"/> are allowed.
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? AllowOnlyDefinedHttpStatusCodeInResponse { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Set to true to disable Json deserialization when processing requests. (default set to false).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? DisableJsonBodyParsing { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Disable support for GZip and Deflate request body decompression. (default set to false).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? DisableRequestBodyDecompressing { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Handle all requests synchronously. (default set to false).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? HandleRequestsSynchronously { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Throw an exception when the <see cref="IMatcher"/> fails because of invalid input. (default set to false).
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool? ThrowExceptionWhenMatcherFails { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// If https is used, these settings can be used to configure the CertificateSettings in case a custom certificate instead the default .NET certificate should be used.
|
|
||||||
///
|
|
||||||
/// X509StoreName and X509StoreLocation should be defined
|
|
||||||
/// OR
|
|
||||||
/// X509CertificateFilePath and X509CertificatePassword should be defined
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public WireMockCertificateSettings? CertificateSettings { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines if custom CertificateSettings are defined
|
|
||||||
/// </summary>
|
|
||||||
[PublicAPI]
|
|
||||||
public bool CustomCertificateDefined => CertificateSettings?.IsDefined == true;
|
|
||||||
|
|
||||||
#if USE_ASPNETCORE
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Client certificate mode for the server
|
/// Gets or sets the http port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public ClientCertificateMode ClientCertificateMode { get; set; }
|
public int? Port { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to accept any client certificate
|
/// Gets or sets the use SSL.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AcceptAnyClientCertificate { get; set; }
|
// ReSharper disable once InconsistentNaming
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? UseSSL { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines on which scheme (http/https) to host. (This overrides the <c>UseSSL</c> value).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public HostingScheme? HostingScheme { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets whether to start admin interface.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? StartAdminInterface { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets if the static mappings should be read at startup.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? ReadStaticMappings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Watch the static mapping files + folder for changes when running.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? WatchStaticMappings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A value indicating whether subdirectories within the static mappings path should be monitored.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? WatchStaticMappingsInSubdirectories { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets if the proxy and record settings.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public ProxyAndRecordSettings? ProxyAndRecordSettings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the urls.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public string[]? Urls { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// StartTimeout
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public int StartTimeout { get; set; } = 10000;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Allow Partial Mapping (default set to false).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? AllowPartialMapping { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The username needed for __admin access.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public string? AdminUsername { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The password needed for __admin access.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public string? AdminPassword { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The AzureAD Tenant needed for __admin access.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public string? AdminAzureADTenant { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The AzureAD Audience / Resource for __admin access.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public string? AdminAzureADAudience { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The RequestLog expiration in hours (optional).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public int? RequestLogExpirationDuration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The MaxRequestLog count (optional).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public int? MaxRequestLogCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Action which is called (with the IAppBuilder or IApplicationBuilder) before the internal WireMockMiddleware is initialized. [Optional]
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
[JsonIgnore]
|
||||||
|
public Action<object>? PreWireMockMiddlewareInit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Action which is called (with the IAppBuilder or IApplicationBuilder) after the internal WireMockMiddleware is initialized. [Optional]
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
[JsonIgnore]
|
||||||
|
public Action<object>? PostWireMockMiddlewareInit { get; set; }
|
||||||
|
|
||||||
|
#if USE_ASPNETCORE
|
||||||
|
/// <summary>
|
||||||
|
/// Action which is called with IServiceCollection when ASP.NET Core DI is being configured. [Optional]
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
[JsonIgnore]
|
||||||
|
public Action<IServiceCollection>? AdditionalServiceRegistration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Policies to use when using CORS. By default CORS is disabled. [Optional]
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public CorsPolicyOptions? CorsPolicyOptions { get; set; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the global IWebhookSettings to use.
|
/// The IWireMockLogger which logs Debug, Info, Warning or Error
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public WebhookSettings? WebhookSettings { get; set; }
|
[JsonIgnore]
|
||||||
|
public IWireMockLogger Logger { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use the <see cref="RegexExtended"/> instead of the default <see cref="Regex"/> (default set to true).
|
/// Handler to interact with the file system to read and write static mapping files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public bool? UseRegexExtended { get; set; } = true;
|
[JsonIgnore]
|
||||||
|
public IFileSystemHandler FileSystemHandler { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save unmatched requests to a file using the <see cref="IFileSystemHandler"/> (default set to false).
|
/// Action which can be used to add additional Handlebars registrations. [Optional]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public bool? SaveUnmatchedRequests { get; set; }
|
[JsonIgnore]
|
||||||
|
public Action<IHandlebars, IFileSystemHandler>? HandlebarsRegistrationCallback { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Don't save the response-string in the LogEntry when WithBody(Func{IRequestMessage, string}) or WithBody(Func{IRequestMessage, Task{string}}) is used. (default set to false).
|
/// Allow the usage of CSharpCodeMatcher (default is not allowed).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public bool? DoNotSaveDynamicResponseInLogEntry { get; set; }
|
public bool? AllowCSharpCodeMatcher { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// See <seealso cref="QueryParameterMultipleValueSupport"/>.
|
/// Allow a Body for all HTTP Methods. (default set to false).
|
||||||
///
|
/// </summary>
|
||||||
/// Default value = "All".
|
[PublicAPI]
|
||||||
/// </summary>
|
public bool? AllowBodyForAllHttpMethods { get; set; }
|
||||||
[PublicAPI]
|
|
||||||
public QueryParameterMultipleValueSupport? QueryParameterMultipleValueSupport { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Custom matcher mappings for static mappings
|
/// Allow only a HttpStatus Code in the response which is defined. (default set to false).
|
||||||
/// </summary>
|
/// - false : also null, 0, empty or invalid HttpStatus codes are allowed.
|
||||||
[PublicAPI, JsonIgnore]
|
/// - true : only codes defined in <see cref="System.Net.HttpStatusCode"/> are allowed.
|
||||||
public IDictionary<string, Func<MatcherModel, IMatcher>>? CustomMatcherMappings { get; set; }
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? AllowOnlyDefinedHttpStatusCodeInResponse { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="JsonSerializerSettings"/> used when the a JSON response is generated.
|
/// Set to true to disable Json deserialization when processing requests. (default set to false).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI, JsonIgnore]
|
[PublicAPI]
|
||||||
public JsonSerializerSettings? JsonSerializerSettings { get; set; }
|
public bool? DisableJsonBodyParsing { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Culture to use.
|
/// Disable support for GZip and Deflate request body decompression. (default set to false).
|
||||||
/// Currently used for:
|
/// </summary>
|
||||||
/// - Handlebars Transformer
|
[PublicAPI]
|
||||||
/// </summary>
|
public bool? DisableRequestBodyDecompressing { get; set; }
|
||||||
public CultureInfo Culture { get; set; } = CultureInfo.CurrentCulture;
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handle all requests synchronously. (default set to false).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? HandleRequestsSynchronously { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Throw an exception when the <see cref="IMatcher"/> fails because of invalid input. (default set to false).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? ThrowExceptionWhenMatcherFails { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If https is used, these settings can be used to configure the CertificateSettings in case a custom certificate instead the default .NET certificate should be used.
|
||||||
|
///
|
||||||
|
/// X509StoreName and X509StoreLocation should be defined
|
||||||
|
/// OR
|
||||||
|
/// X509CertificateFilePath and X509CertificatePassword should be defined
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public WireMockCertificateSettings? CertificateSettings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines if custom CertificateSettings are defined
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool CustomCertificateDefined => CertificateSettings?.IsDefined == true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the global IWebhookSettings to use.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public WebhookSettings? WebhookSettings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use the <see cref="RegexExtended"/> instead of the default <see cref="Regex"/> (default set to true).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? UseRegexExtended { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Save unmatched requests to a file using the <see cref="IFileSystemHandler"/> (default set to false).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? SaveUnmatchedRequests { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Don't save the response-string in the LogEntry when WithBody(Func{IRequestMessage, string}) or WithBody(Func{IRequestMessage, Task{string}}) is used. (default set to false).
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public bool? DoNotSaveDynamicResponseInLogEntry { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// See <seealso cref="QueryParameterMultipleValueSupport"/>.
|
||||||
|
///
|
||||||
|
/// Default value = "All".
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI]
|
||||||
|
public QueryParameterMultipleValueSupport? QueryParameterMultipleValueSupport { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Custom matcher mappings for static mappings
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI, JsonIgnore]
|
||||||
|
public IDictionary<string, Func<MatcherModel, IMatcher>>? CustomMatcherMappings { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The <see cref="JsonSerializerSettings"/> used when the a JSON response is generated.
|
||||||
|
/// </summary>
|
||||||
|
[PublicAPI, JsonIgnore]
|
||||||
|
public JsonSerializerSettings? JsonSerializerSettings { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Stef.Validation;
|
using Stef.Validation;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
|
||||||
|
|
||||||
namespace WireMock.Settings;
|
namespace WireMock.Settings;
|
||||||
|
|
||||||
@@ -58,14 +55,11 @@ public static class WireMockServerSettingsParser
|
|||||||
WatchStaticMappingsInSubdirectories = parser.GetBoolValue("WatchStaticMappingsInSubdirectories"),
|
WatchStaticMappingsInSubdirectories = parser.GetBoolValue("WatchStaticMappingsInSubdirectories"),
|
||||||
HostingScheme = parser.GetEnumValue<HostingScheme>(nameof(WireMockServerSettings.HostingScheme)),
|
HostingScheme = parser.GetEnumValue<HostingScheme>(nameof(WireMockServerSettings.HostingScheme)),
|
||||||
DoNotSaveDynamicResponseInLogEntry = parser.GetBoolValue(nameof(WireMockServerSettings.DoNotSaveDynamicResponseInLogEntry)),
|
DoNotSaveDynamicResponseInLogEntry = parser.GetBoolValue(nameof(WireMockServerSettings.DoNotSaveDynamicResponseInLogEntry)),
|
||||||
QueryParameterMultipleValueSupport = parser.GetEnumValue<QueryParameterMultipleValueSupport>(nameof(WireMockServerSettings.QueryParameterMultipleValueSupport)),
|
QueryParameterMultipleValueSupport = parser.GetEnumValue<QueryParameterMultipleValueSupport>(nameof(WireMockServerSettings.QueryParameterMultipleValueSupport))
|
||||||
Culture = parser.GetValue(nameof(WireMockServerSettings.Culture), strings => CultureInfoUtils.Parse(strings.FirstOrDefault()), CultureInfo.CurrentCulture)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if USE_ASPNETCORE
|
#if USE_ASPNETCORE
|
||||||
settings.CorsPolicyOptions = parser.GetEnumValue(nameof(WireMockServerSettings.CorsPolicyOptions), CorsPolicyOptions.None);
|
settings.CorsPolicyOptions = parser.GetEnumValue(nameof(WireMockServerSettings.CorsPolicyOptions), CorsPolicyOptions.None);
|
||||||
settings.ClientCertificateMode = parser.GetEnumValue(nameof(WireMockServerSettings.ClientCertificateMode), ClientCertificateMode.NoCertificate);
|
|
||||||
settings.AcceptAnyClientCertificate = parser.GetBoolValue(nameof(WireMockServerSettings.AcceptAnyClientCertificate));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var loggerType = parser.GetStringValue("WireMockLogger");
|
var loggerType = parser.GetStringValue("WireMockLogger");
|
||||||
|
|||||||
@@ -1,26 +1,27 @@
|
|||||||
|
using System;
|
||||||
using HandlebarsDotNet;
|
using HandlebarsDotNet;
|
||||||
using HandlebarsDotNet.Helpers.Attributes;
|
using HandlebarsDotNet.Helpers.Attributes;
|
||||||
using HandlebarsDotNet.Helpers.Enums;
|
using HandlebarsDotNet.Helpers.Enums;
|
||||||
using HandlebarsDotNet.Helpers.Helpers;
|
using HandlebarsDotNet.Helpers.Helpers;
|
||||||
using Stef.Validation;
|
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars;
|
namespace WireMock.Transformers.Handlebars
|
||||||
|
|
||||||
internal class FileHelpers : BaseHelpers, IHelpers
|
|
||||||
{
|
{
|
||||||
private readonly IFileSystemHandler _fileSystemHandler;
|
internal class FileHelpers : BaseHelpers, IHelpers
|
||||||
|
|
||||||
public FileHelpers(IHandlebars context, IFileSystemHandler fileSystemHandler) : base(context)
|
|
||||||
{
|
{
|
||||||
_fileSystemHandler = Guard.NotNull(fileSystemHandler);
|
private readonly IFileSystemHandler _fileSystemHandler;
|
||||||
}
|
|
||||||
|
|
||||||
[HandlebarsWriter(WriterType.String, usage: HelperUsage.Both, passContext: true, name: "File")]
|
public FileHelpers(IHandlebars context, IFileSystemHandler fileSystemHandler) : base(context)
|
||||||
public string Read(Context context, string path)
|
{
|
||||||
{
|
_fileSystemHandler = fileSystemHandler ?? throw new ArgumentNullException(nameof(fileSystemHandler));
|
||||||
var templateFunc = Context.Compile(path);
|
}
|
||||||
string transformed = templateFunc(context.Value);
|
|
||||||
return _fileSystemHandler.ReadResponseBodyAsString(transformed);
|
[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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,35 +1,18 @@
|
|||||||
using HandlebarsDotNet;
|
using HandlebarsDotNet;
|
||||||
using HandlebarsDotNet.Helpers.Extensions;
|
|
||||||
using Stef.Validation;
|
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars;
|
namespace WireMock.Transformers.Handlebars
|
||||||
|
|
||||||
internal class HandlebarsContext : IHandlebarsContext
|
|
||||||
{
|
{
|
||||||
public IHandlebars Handlebars { get; }
|
internal class HandlebarsContext : IHandlebarsContext
|
||||||
|
|
||||||
public IFileSystemHandler FileSystemHandler { get; }
|
|
||||||
|
|
||||||
public HandlebarsContext(IHandlebars handlebars, IFileSystemHandler fileSystemHandler)
|
|
||||||
{
|
{
|
||||||
Handlebars = Guard.NotNull(handlebars);
|
public IHandlebars Handlebars { get; set; }
|
||||||
FileSystemHandler = Guard.NotNull(fileSystemHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ParseAndRender(string text, object model)
|
public IFileSystemHandler FileSystemHandler { get; set; }
|
||||||
{
|
|
||||||
var template = Handlebars.Compile(text);
|
|
||||||
return template(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object? ParseAndEvaluate(string text, object model)
|
public string ParseAndRender(string text, object model)
|
||||||
{
|
|
||||||
if (Handlebars.TryEvaluate(text, model, out var result) && result is not UndefinedBindingResult)
|
|
||||||
{
|
{
|
||||||
return result;
|
var template = Handlebars.Compile(text);
|
||||||
|
return template(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ParseAndRender(text, model);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,30 +1,33 @@
|
|||||||
|
using System;
|
||||||
using HandlebarsDotNet;
|
using HandlebarsDotNet;
|
||||||
using Stef.Validation;
|
using Stef.Validation;
|
||||||
using WireMock.Settings;
|
using WireMock.Handlers;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars;
|
namespace WireMock.Transformers.Handlebars;
|
||||||
|
|
||||||
internal class HandlebarsContextFactory : ITransformerContextFactory
|
internal class HandlebarsContextFactory : ITransformerContextFactory
|
||||||
{
|
{
|
||||||
private readonly WireMockServerSettings _settings;
|
private readonly IFileSystemHandler _fileSystemHandler;
|
||||||
|
private readonly Action<IHandlebars, IFileSystemHandler>? _action;
|
||||||
|
|
||||||
public HandlebarsContextFactory(WireMockServerSettings settings)
|
public HandlebarsContextFactory(IFileSystemHandler fileSystemHandler, Action<IHandlebars, IFileSystemHandler>? action)
|
||||||
{
|
{
|
||||||
_settings = Guard.NotNull(settings);
|
_fileSystemHandler = Guard.NotNull(fileSystemHandler);
|
||||||
|
_action = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITransformerContext Create()
|
public ITransformerContext Create()
|
||||||
{
|
{
|
||||||
var config = new HandlebarsConfiguration
|
var handlebars = HandlebarsDotNet.Handlebars.Create();
|
||||||
|
|
||||||
|
WireMockHandlebarsHelpers.Register(handlebars, _fileSystemHandler);
|
||||||
|
|
||||||
|
_action?.Invoke(handlebars, _fileSystemHandler);
|
||||||
|
|
||||||
|
return new HandlebarsContext
|
||||||
{
|
{
|
||||||
FormatProvider = _settings.Culture
|
Handlebars = handlebars,
|
||||||
|
FileSystemHandler = _fileSystemHandler
|
||||||
};
|
};
|
||||||
var handlebars = HandlebarsDotNet.Handlebars.Create(config);
|
|
||||||
|
|
||||||
WireMockHandlebarsHelpers.Register(handlebars, _settings.FileSystemHandler);
|
|
||||||
|
|
||||||
_settings.HandlebarsRegistrationCallback?.Invoke(handlebars, _settings.FileSystemHandler);
|
|
||||||
|
|
||||||
return new HandlebarsContext(handlebars, _settings.FileSystemHandler);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
using HandlebarsDotNet;
|
using HandlebarsDotNet;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Handlebars;
|
namespace WireMock.Transformers.Handlebars
|
||||||
|
|
||||||
interface IHandlebarsContext : ITransformerContext
|
|
||||||
{
|
{
|
||||||
IHandlebars Handlebars { get; }
|
interface IHandlebarsContext : ITransformerContext
|
||||||
|
{
|
||||||
|
IHandlebars Handlebars { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
|
|
||||||
namespace WireMock.Transformers;
|
namespace WireMock.Transformers
|
||||||
|
|
||||||
internal interface ITransformerContext
|
|
||||||
{
|
{
|
||||||
IFileSystemHandler FileSystemHandler { get; }
|
interface ITransformerContext
|
||||||
|
{
|
||||||
|
IFileSystemHandler FileSystemHandler { get; set; }
|
||||||
|
|
||||||
string ParseAndRender(string text, object model);
|
string ParseAndRender(string text, object model);
|
||||||
|
}
|
||||||
object? ParseAndEvaluate(string text, object model);
|
|
||||||
}
|
}
|
||||||
@@ -3,30 +3,25 @@ using Stef.Validation;
|
|||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Scriban;
|
namespace WireMock.Transformers.Scriban
|
||||||
|
|
||||||
internal class ScribanContext : ITransformerContext
|
|
||||||
{
|
{
|
||||||
private readonly TransformerType _transformerType;
|
internal class ScribanContext : ITransformerContext
|
||||||
|
|
||||||
public IFileSystemHandler FileSystemHandler { get; }
|
|
||||||
|
|
||||||
public ScribanContext(IFileSystemHandler fileSystemHandler, TransformerType transformerType)
|
|
||||||
{
|
{
|
||||||
FileSystemHandler = Guard.NotNull(fileSystemHandler);
|
private readonly TransformerType _transformerType;
|
||||||
_transformerType = transformerType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ParseAndRender(string text, object model)
|
public IFileSystemHandler FileSystemHandler { get; set; }
|
||||||
{
|
|
||||||
var template = _transformerType == TransformerType.ScribanDotLiquid ? Template.ParseLiquid(text) : Template.Parse(text);
|
|
||||||
|
|
||||||
return template.Render(model, member => member.Name);
|
public ScribanContext(IFileSystemHandler fileSystemHandler, TransformerType transformerType)
|
||||||
}
|
{
|
||||||
|
FileSystemHandler = Guard.NotNull(fileSystemHandler);
|
||||||
|
_transformerType = transformerType;
|
||||||
|
}
|
||||||
|
|
||||||
public object? ParseAndEvaluate(string text, object model)
|
public string ParseAndRender(string text, object model)
|
||||||
{
|
{
|
||||||
// In case of Scriban, call ParseAndRender.
|
var template = _transformerType == TransformerType.ScribanDotLiquid ? Template.ParseLiquid(text) : Template.Parse(text);
|
||||||
return ParseAndRender(text, model);
|
|
||||||
|
return template.Render(model, member => member.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,21 +2,22 @@ using WireMock.Handlers;
|
|||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using Stef.Validation;
|
using Stef.Validation;
|
||||||
|
|
||||||
namespace WireMock.Transformers.Scriban;
|
namespace WireMock.Transformers.Scriban
|
||||||
|
|
||||||
internal class ScribanContextFactory : ITransformerContextFactory
|
|
||||||
{
|
{
|
||||||
private readonly IFileSystemHandler _fileSystemHandler;
|
internal class ScribanContextFactory : ITransformerContextFactory
|
||||||
private readonly TransformerType _transformerType;
|
|
||||||
|
|
||||||
public ScribanContextFactory(IFileSystemHandler fileSystemHandler, TransformerType transformerType)
|
|
||||||
{
|
{
|
||||||
_fileSystemHandler = Guard.NotNull(fileSystemHandler);
|
private readonly IFileSystemHandler _fileSystemHandler;
|
||||||
_transformerType = Guard.Condition(transformerType, t => t is TransformerType.Scriban or TransformerType.ScribanDotLiquid);
|
private readonly TransformerType _transformerType;
|
||||||
}
|
|
||||||
|
|
||||||
public ITransformerContext Create()
|
public ScribanContextFactory(IFileSystemHandler fileSystemHandler, TransformerType transformerType)
|
||||||
{
|
{
|
||||||
return new ScribanContext(_fileSystemHandler, _transformerType);
|
_fileSystemHandler = Guard.NotNull(fileSystemHandler);
|
||||||
|
_transformerType = Guard.Condition(transformerType, t => t == TransformerType.Scriban || t == TransformerType.ScribanDotLiquid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ITransformerContext Create()
|
||||||
|
{
|
||||||
|
return new ScribanContext(_fileSystemHandler, _transformerType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Linq;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Stef.Validation;
|
using Stef.Validation;
|
||||||
using WireMock.Settings;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
|
|
||||||
@@ -13,19 +11,11 @@ namespace WireMock.Transformers;
|
|||||||
|
|
||||||
internal class Transformer : ITransformer
|
internal class Transformer : ITransformer
|
||||||
{
|
{
|
||||||
private static readonly Type[] SupportedTypes = { typeof(bool), typeof(long), typeof(int), typeof(double), typeof(Guid), typeof(DateTime), typeof(TimeSpan), typeof(Uri) };
|
|
||||||
|
|
||||||
private readonly JsonSerializer _jsonSerializer;
|
|
||||||
private readonly ITransformerContextFactory _factory;
|
private readonly ITransformerContextFactory _factory;
|
||||||
|
|
||||||
public Transformer(WireMockServerSettings settings, ITransformerContextFactory factory)
|
public Transformer(ITransformerContextFactory factory)
|
||||||
{
|
{
|
||||||
_factory = Guard.NotNull(factory);
|
_factory = Guard.NotNull(factory);
|
||||||
|
|
||||||
_jsonSerializer = new JsonSerializer
|
|
||||||
{
|
|
||||||
Culture = Guard.NotNull(settings).Culture
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBodyData? TransformBody(
|
public IBodyData? TransformBody(
|
||||||
@@ -119,7 +109,7 @@ internal class Transformer : ITransformer
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBodyData? TransformBodyData(ITransformerContext transformerContext, ReplaceNodeOptions options, TransformModel model, IBodyData original, bool useTransformerForBodyAsFile)
|
private static IBodyData? TransformBodyData(ITransformerContext transformerContext, ReplaceNodeOptions options, TransformModel model, IBodyData original, bool useTransformerForBodyAsFile)
|
||||||
{
|
{
|
||||||
return original.DetectedBodyType switch
|
return original.DetectedBodyType switch
|
||||||
{
|
{
|
||||||
@@ -149,33 +139,33 @@ internal class Transformer : ITransformer
|
|||||||
return newHeaders;
|
return newHeaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBodyData TransformBodyAsJson(ITransformerContext transformerContext, ReplaceNodeOptions options, object model, IBodyData original)
|
private static IBodyData TransformBodyAsJson(ITransformerContext handlebarsContext, ReplaceNodeOptions options, object model, IBodyData original)
|
||||||
{
|
{
|
||||||
JToken? jToken = null;
|
JToken? jToken = null;
|
||||||
switch (original.BodyAsJson)
|
switch (original.BodyAsJson)
|
||||||
{
|
{
|
||||||
case JObject bodyAsJObject:
|
case JObject bodyAsJObject:
|
||||||
jToken = bodyAsJObject.DeepClone();
|
jToken = bodyAsJObject.DeepClone();
|
||||||
WalkNode(transformerContext, options, jToken, model);
|
WalkNode(handlebarsContext, options, jToken, model);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JArray bodyAsJArray:
|
case JArray bodyAsJArray:
|
||||||
jToken = bodyAsJArray.DeepClone();
|
jToken = bodyAsJArray.DeepClone();
|
||||||
WalkNode(transformerContext, options, jToken, model);
|
WalkNode(handlebarsContext, options, jToken, model);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Array bodyAsArray:
|
case Array bodyAsArray:
|
||||||
jToken = JArray.FromObject(bodyAsArray, _jsonSerializer);
|
jToken = JArray.FromObject(bodyAsArray);
|
||||||
WalkNode(transformerContext, options, jToken, model);
|
WalkNode(handlebarsContext, options, jToken, model);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case string bodyAsString:
|
case string bodyAsString:
|
||||||
jToken = ReplaceSingleNode(transformerContext, options, bodyAsString, model);
|
jToken = ReplaceSingleNode(handlebarsContext, options, bodyAsString, model);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case not null:
|
case not null:
|
||||||
jToken = JObject.FromObject(original.BodyAsJson, _jsonSerializer);
|
jToken = JObject.FromObject(original.BodyAsJson);
|
||||||
WalkNode(transformerContext, options, jToken, model);
|
WalkNode(handlebarsContext, options, jToken, model);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,9 +178,9 @@ internal class Transformer : ITransformer
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private JToken ReplaceSingleNode(ITransformerContext transformerContext, ReplaceNodeOptions options, string stringValue, object model)
|
private static JToken ReplaceSingleNode(ITransformerContext handlebarsContext, ReplaceNodeOptions options, string stringValue, object model)
|
||||||
{
|
{
|
||||||
string transformedString = transformerContext.ParseAndRender(stringValue, model);
|
string transformedString = handlebarsContext.ParseAndRender(stringValue, model);
|
||||||
|
|
||||||
if (!string.Equals(stringValue, transformedString))
|
if (!string.Equals(stringValue, transformedString))
|
||||||
{
|
{
|
||||||
@@ -212,7 +202,7 @@ internal class Transformer : ITransformer
|
|||||||
return stringValue;
|
return stringValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WalkNode(ITransformerContext transformerContext, ReplaceNodeOptions options, JToken node, object model)
|
private static void WalkNode(ITransformerContext handlebarsContext, ReplaceNodeOptions options, JToken node, object model)
|
||||||
{
|
{
|
||||||
switch (node.Type)
|
switch (node.Type)
|
||||||
{
|
{
|
||||||
@@ -220,7 +210,7 @@ internal class Transformer : ITransformer
|
|||||||
// In case of Object, loop all children. Do a ToArray() to avoid `Collection was modified` exceptions.
|
// In case of Object, loop all children. Do a ToArray() to avoid `Collection was modified` exceptions.
|
||||||
foreach (var child in node.Children<JProperty>().ToArray())
|
foreach (var child in node.Children<JProperty>().ToArray())
|
||||||
{
|
{
|
||||||
WalkNode(transformerContext, options, child.Value, model);
|
WalkNode(handlebarsContext, options, child.Value, model);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -228,7 +218,7 @@ internal class Transformer : ITransformer
|
|||||||
// In case of Array, loop all items. Do a ToArray() to avoid `Collection was modified` exceptions.
|
// In case of Array, loop all items. Do a ToArray() to avoid `Collection was modified` exceptions.
|
||||||
foreach (var child in node.Children().ToArray())
|
foreach (var child in node.Children().ToArray())
|
||||||
{
|
{
|
||||||
WalkNode(transformerContext, options, child, model);
|
WalkNode(handlebarsContext, options, child, model);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -240,8 +230,8 @@ internal class Transformer : ITransformer
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var transformed = transformerContext.ParseAndEvaluate(stringValue, model);
|
string transformed = handlebarsContext.ParseAndRender(stringValue!, model);
|
||||||
if (!Equals(stringValue, transformed))
|
if (!string.Equals(stringValue, transformed))
|
||||||
{
|
{
|
||||||
ReplaceNodeValue(options, node, transformed);
|
ReplaceNodeValue(options, node, transformed);
|
||||||
}
|
}
|
||||||
@@ -250,88 +240,44 @@ internal class Transformer : ITransformer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable once UnusedParameter.Local
|
// ReSharper disable once UnusedParameter.Local
|
||||||
private void ReplaceNodeValue(ReplaceNodeOptions options, JToken node, object? transformedValue)
|
private static void ReplaceNodeValue(ReplaceNodeOptions options, JToken node, string transformedString)
|
||||||
{
|
{
|
||||||
switch (transformedValue)
|
StringUtils.TryParseQuotedString(transformedString, out var result, out _);
|
||||||
|
if (bool.TryParse(result, out var valueAsBoolean) || bool.TryParse(transformedString, out valueAsBoolean))
|
||||||
{
|
{
|
||||||
case JValue jValue:
|
node.Replace(valueAsBoolean);
|
||||||
node.Replace(jValue);
|
return;
|
||||||
return;
|
|
||||||
|
|
||||||
case string transformedString:
|
|
||||||
if (TryConvert(transformedString, out var convertedFromStringValue))
|
|
||||||
{
|
|
||||||
node.Replace(JToken.FromObject(convertedFromStringValue, _jsonSerializer));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
node.Replace(ParseAsJObject(transformedString));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WireMockList<string> strings:
|
|
||||||
switch (strings.Count)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
node.Replace(ParseAsJObject(strings[0]));
|
|
||||||
return;
|
|
||||||
|
|
||||||
case > 1:
|
|
||||||
node.Replace(JToken.FromObject(strings.ToArray(), _jsonSerializer));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case { }:
|
|
||||||
if (TryConvert(transformedValue, out var convertedValue))
|
|
||||||
{
|
|
||||||
node.Replace(JToken.FromObject(convertedValue, _jsonSerializer));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
default: // It's null, skip it. Maybe remove it ?
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static JToken ParseAsJObject(string stringValue)
|
|
||||||
{
|
|
||||||
return JsonUtils.TryParseAsJObject(stringValue, out var parsedAsjObject) ? parsedAsjObject : stringValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool TryConvert(object? transformedValue, [NotNullWhen(true)] out object? convertedValue)
|
|
||||||
{
|
|
||||||
foreach (var supportedType in SupportedTypes)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
convertedValue = Convert.ChangeType(transformedValue, supportedType);
|
|
||||||
return convertedValue is not null;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
convertedValue = null;
|
JToken value;
|
||||||
return false;
|
try
|
||||||
|
{
|
||||||
|
// Try to convert this string into a JsonObject
|
||||||
|
value = JToken.Parse(transformedString);
|
||||||
|
}
|
||||||
|
catch (JsonException)
|
||||||
|
{
|
||||||
|
// Ignore JsonException and just keep string value and convert to JToken
|
||||||
|
value = transformedString;
|
||||||
|
}
|
||||||
|
|
||||||
|
node.Replace(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IBodyData TransformBodyAsString(ITransformerContext transformerContext, object model, IBodyData original)
|
private static IBodyData TransformBodyAsString(ITransformerContext handlebarsContext, object model, IBodyData original)
|
||||||
{
|
{
|
||||||
return new BodyData
|
return new BodyData
|
||||||
{
|
{
|
||||||
Encoding = original.Encoding,
|
Encoding = original.Encoding,
|
||||||
DetectedBodyType = original.DetectedBodyType,
|
DetectedBodyType = original.DetectedBodyType,
|
||||||
DetectedBodyTypeFromContentType = original.DetectedBodyTypeFromContentType,
|
DetectedBodyTypeFromContentType = original.DetectedBodyTypeFromContentType,
|
||||||
BodyAsString = transformerContext.ParseAndRender(original.BodyAsString!, model)
|
BodyAsString = handlebarsContext.ParseAndRender(original.BodyAsString!, model)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IBodyData TransformBodyAsFile(ITransformerContext transformerContext, object model, IBodyData original, bool useTransformerForBodyAsFile)
|
private static IBodyData TransformBodyAsFile(ITransformerContext handlebarsContext, object model, IBodyData original, bool useTransformerForBodyAsFile)
|
||||||
{
|
{
|
||||||
string transformedBodyAsFilename = transformerContext.ParseAndRender(original.BodyAsFile!, model);
|
string transformedBodyAsFilename = handlebarsContext.ParseAndRender(original.BodyAsFile!, model);
|
||||||
|
|
||||||
if (!useTransformerForBodyAsFile)
|
if (!useTransformerForBodyAsFile)
|
||||||
{
|
{
|
||||||
@@ -343,12 +289,12 @@ internal class Transformer : ITransformer
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
string text = transformerContext.FileSystemHandler.ReadResponseBodyAsString(transformedBodyAsFilename);
|
string text = handlebarsContext.FileSystemHandler.ReadResponseBodyAsString(transformedBodyAsFilename);
|
||||||
return new BodyData
|
return new BodyData
|
||||||
{
|
{
|
||||||
DetectedBodyType = BodyType.String,
|
DetectedBodyType = BodyType.String,
|
||||||
DetectedBodyTypeFromContentType = original.DetectedBodyTypeFromContentType,
|
DetectedBodyTypeFromContentType = original.DetectedBodyTypeFromContentType,
|
||||||
BodyAsString = transformerContext.ParseAndRender(text, model),
|
BodyAsString = handlebarsContext.ParseAndRender(text, model),
|
||||||
BodyAsFile = transformedBodyAsFilename
|
BodyAsFile = transformedBodyAsFilename
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Globalization;
|
|
||||||
|
|
||||||
namespace WireMock.Util;
|
|
||||||
|
|
||||||
internal static class CultureInfoUtils
|
|
||||||
{
|
|
||||||
public static CultureInfo Parse(string? value)
|
|
||||||
{
|
|
||||||
if (value is null)
|
|
||||||
{
|
|
||||||
return CultureInfo.CurrentCulture;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
#if !NETSTANDARD1_3
|
|
||||||
if (int.TryParse(value, out var culture))
|
|
||||||
{
|
|
||||||
return new CultureInfo(culture);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (string.Equals(value, nameof(CultureInfo.CurrentCulture), StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
return CultureInfo.CurrentCulture;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.Equals(value, nameof(CultureInfo.InvariantCulture), StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
return CultureInfo.InvariantCulture;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new CultureInfo(value);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return CultureInfo.CurrentCulture;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace WireMock.Util;
|
|
||||||
|
|
||||||
internal interface IDateTimeUtils
|
|
||||||
{
|
|
||||||
DateTime UtcNow { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class DateTimeUtils : IDateTimeUtils
|
|
||||||
{
|
|
||||||
public DateTime UtcNow => DateTime.UtcNow;
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<Description>Lightweight Http Mocking Server for .Net, inspired by WireMock from the Java landscape.</Description>
|
<Description>Lightweight Http Mocking Server for .Net, inspired by WireMock from the Java landscape.</Description>
|
||||||
<AssemblyTitle>WireMock.Net</AssemblyTitle>
|
<AssemblyTitle>WireMock.Net</AssemblyTitle>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<AssemblyName>WireMock.Net</AssemblyName>
|
<AssemblyName>WireMock.Net</AssemblyName>
|
||||||
<PackageId>WireMock.Net</PackageId>
|
<PackageId>WireMock.Net</PackageId>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<DefineConstants>NETSTANDARD;USE_ASPNETCORE</DefineConstants>
|
<DefineConstants>NETSTANDARD;USE_ASPNETCORE</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' or '$(TargetFramework)' == 'netcoreapp2.2' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0'or '$(TargetFramework)' == 'net7.0' ">
|
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' or '$(TargetFramework)' == 'netcoreapp2.2' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0'or '$(TargetFramework)' == 'net6.0' ">
|
||||||
<DefineConstants>USE_ASPNETCORE</DefineConstants>
|
<DefineConstants>USE_ASPNETCORE</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -52,15 +52,15 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="JsonConverter.Abstractions" Version="0.3.0" />
|
<PackageReference Include="JsonConverter.Abstractions" Version="0.2.0" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="NJsonSchema.Extensions" Version="0.1.0" />
|
<PackageReference Include="NJsonSchema.Extensions" Version="0.1.0" />
|
||||||
<PackageReference Include="NSwag.Core" Version="13.16.1" />
|
<PackageReference Include="NSwag.Core" Version="13.16.1" />
|
||||||
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
||||||
<!--<PackageReference Include="Stef.Validation" Version="0.1.1" />-->
|
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.23" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.19" />
|
||||||
<PackageReference Include="JmesPath.Net" Version="1.0.125" />
|
<PackageReference Include="JmesPath.Net" Version="1.0.125" />
|
||||||
<PackageReference Include="AnyOf" Version="0.3.0" />
|
<PackageReference Include="AnyOf" Version="0.3.0" />
|
||||||
<PackageReference Include="TinyMapper" Version="3.0.3" />
|
<PackageReference Include="TinyMapper" Version="3.0.3" />
|
||||||
@@ -87,8 +87,8 @@
|
|||||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||||
<PackageReference Include="Scriban.Signed" Version="2.1.4" />
|
<PackageReference Include="Scriban.Signed" Version="2.1.4" />
|
||||||
<PackageReference Include="Nullable" Version="1.3.1">
|
<PackageReference Include="Nullable" Version="1.3.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="2.2.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="2.2.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0' ">
|
||||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||||
<PackageReference Include="Scriban.Signed" Version="5.5.0" />
|
<PackageReference Include="Scriban.Signed" Version="5.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -163,13 +163,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.3.5" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.3.5" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Humanizer" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers.Humanizer" Version="2.3.5" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.3.5" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.3.5" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.3.5" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.3.11" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.3.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!--<PackageReference Include="AnyOf" Version="0.1.0" />-->
|
<!--<PackageReference Include="AnyOf" Version="0.1.0" />-->
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<PackAsTool>true</PackAsTool>
|
<PackAsTool>true</PackAsTool>
|
||||||
<ToolCommandName>dotnet-wiremock</ToolCommandName>
|
<ToolCommandName>dotnet-wiremock</ToolCommandName>
|
||||||
<Description>A dotnet commandline tool for WireMock.Net (A Lightweight Http Mocking Server for .NET)</Description>
|
<Description>A dotnet commandline tool for WireMock.Net (A Lightweight Http Mocking Server for .NET)</Description>
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||||
<PackageReference Include="System.Text.Json" Version="7.0.0" />
|
<PackageReference Include="System.Text.Json" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -30,222 +30,222 @@ using IRequest = Microsoft.AspNetCore.Http.HttpRequest;
|
|||||||
using IResponse = Microsoft.AspNetCore.Http.HttpResponse;
|
using IResponse = Microsoft.AspNetCore.Http.HttpResponse;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace WireMock.Net.Tests.Owin;
|
namespace WireMock.Net.Tests.Owin
|
||||||
|
|
||||||
public class WireMockMiddlewareTests
|
|
||||||
{
|
{
|
||||||
private readonly DateTime _updatedAt = new(2022, 12, 4);
|
public class WireMockMiddlewareTests
|
||||||
private readonly ConcurrentDictionary<Guid, IMapping> _mappings = new();
|
|
||||||
|
|
||||||
private readonly Mock<IWireMockMiddlewareOptions> _optionsMock;
|
|
||||||
private readonly Mock<IOwinRequestMapper> _requestMapperMock;
|
|
||||||
private readonly Mock<IOwinResponseMapper> _responseMapperMock;
|
|
||||||
private readonly Mock<IMappingMatcher> _matcherMock;
|
|
||||||
private readonly Mock<IMapping> _mappingMock;
|
|
||||||
private readonly Mock<IContext> _contextMock;
|
|
||||||
|
|
||||||
private readonly WireMockMiddleware _sut;
|
|
||||||
|
|
||||||
public WireMockMiddlewareTests()
|
|
||||||
{
|
{
|
||||||
_optionsMock = new Mock<IWireMockMiddlewareOptions>();
|
private readonly WireMockMiddleware _sut;
|
||||||
_optionsMock.SetupAllProperties();
|
|
||||||
_optionsMock.Setup(o => o.Mappings).Returns(_mappings);
|
|
||||||
_optionsMock.Setup(o => o.LogEntries).Returns(new ConcurrentObservableCollection<LogEntry>());
|
|
||||||
_optionsMock.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary<string, ScenarioState>());
|
|
||||||
_optionsMock.Setup(o => o.Logger.Warn(It.IsAny<string>(), It.IsAny<object[]>()));
|
|
||||||
_optionsMock.Setup(o => o.Logger.Error(It.IsAny<string>(), It.IsAny<object[]>()));
|
|
||||||
_optionsMock.Setup(o => o.Logger.DebugRequestResponse(It.IsAny<LogEntryModel>(), It.IsAny<bool>()));
|
|
||||||
|
|
||||||
_requestMapperMock = new Mock<IOwinRequestMapper>();
|
private readonly Mock<IWireMockMiddlewareOptions> _optionsMock;
|
||||||
_requestMapperMock.SetupAllProperties();
|
private readonly Mock<IOwinRequestMapper> _requestMapperMock;
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1");
|
private readonly Mock<IOwinResponseMapper> _responseMapperMock;
|
||||||
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
private readonly Mock<IMappingMatcher> _matcherMock;
|
||||||
|
private readonly Mock<IMapping> _mappingMock;
|
||||||
|
private readonly Mock<IContext> _contextMock;
|
||||||
|
|
||||||
_responseMapperMock = new Mock<IOwinResponseMapper>();
|
private readonly ConcurrentDictionary<Guid, IMapping> _mappings = new ConcurrentDictionary<Guid, IMapping>();
|
||||||
_responseMapperMock.SetupAllProperties();
|
|
||||||
_responseMapperMock.Setup(m => m.MapAsync(It.IsAny<ResponseMessage>(), It.IsAny<IResponse>())).Returns(Task.FromResult(true));
|
|
||||||
|
|
||||||
_matcherMock = new Mock<IMappingMatcher>();
|
public WireMockMiddlewareTests()
|
||||||
_matcherMock.SetupAllProperties();
|
|
||||||
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((new MappingMatcherResult(), new MappingMatcherResult()));
|
|
||||||
|
|
||||||
_contextMock = new Mock<IContext>();
|
|
||||||
|
|
||||||
_mappingMock = new Mock<IMapping>();
|
|
||||||
|
|
||||||
_sut = new WireMockMiddleware(null, _optionsMock.Object, _requestMapperMock.Object, _responseMapperMock.Object, _matcherMock.Object);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockMiddleware_Invoke_NoMatch()
|
|
||||||
{
|
|
||||||
// Act
|
|
||||||
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
|
||||||
|
|
||||||
// Assert and Verify
|
|
||||||
_optionsMock.Verify(o => o.Logger.Warn(It.IsAny<string>(), It.IsAny<object[]>()), Times.Once);
|
|
||||||
|
|
||||||
Expression<Func<ResponseMessage, bool>> match = r => (int)r.StatusCode == 404 && ((StatusModel)r.BodyData.BodyAsJson).Status == "No matching mapping found";
|
|
||||||
_responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny<IResponse>()), Times.Once);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockMiddleware_Invoke_IsAdminInterface_EmptyHeaders_401()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]>());
|
|
||||||
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
|
||||||
|
|
||||||
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
|
||||||
_mappingMock.SetupGet(m => m.IsAdminInterface).Returns(true);
|
|
||||||
|
|
||||||
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
|
||||||
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
|
||||||
|
|
||||||
// Act
|
|
||||||
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
|
||||||
|
|
||||||
// Assert and Verify
|
|
||||||
_optionsMock.Verify(o => o.Logger.Error(It.IsAny<string>(), It.IsAny<object[]>()), Times.Once);
|
|
||||||
|
|
||||||
Expression<Func<ResponseMessage, bool>> match = r => (int)r.StatusCode == 401;
|
|
||||||
_responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny<IResponse>()), Times.Once);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockMiddleware_Invoke_IsAdminInterface_MissingHeader_401()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]> { { "h", new[] { "x" } } });
|
|
||||||
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
|
||||||
|
|
||||||
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
|
||||||
_mappingMock.SetupGet(m => m.IsAdminInterface).Returns(true);
|
|
||||||
|
|
||||||
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
|
||||||
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
|
||||||
|
|
||||||
// Act
|
|
||||||
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
|
||||||
|
|
||||||
// Assert and Verify
|
|
||||||
_optionsMock.Verify(o => o.Logger.Error(It.IsAny<string>(), It.IsAny<object[]>()), Times.Once);
|
|
||||||
|
|
||||||
Expression<Func<ResponseMessage, bool>> match = r => (int)r.StatusCode == 401;
|
|
||||||
_responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny<IResponse>()), Times.Once);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockMiddleware_Invoke_RequestLogExpirationDurationIsDefined()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
_optionsMock.SetupGet(o => o.RequestLogExpirationDuration).Returns(1);
|
|
||||||
|
|
||||||
// Act
|
|
||||||
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockMiddleware_Invoke_Mapping_Has_ProxyAndRecordSettings_And_SaveMapping_Is_True()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]>());
|
|
||||||
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
|
||||||
|
|
||||||
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
|
||||||
|
|
||||||
var fileSystemHandlerMock = new Mock<IFileSystemHandler>();
|
|
||||||
fileSystemHandlerMock.Setup(f => f.GetMappingFolder()).Returns("m");
|
|
||||||
|
|
||||||
var logger = new Mock<IWireMockLogger>();
|
|
||||||
|
|
||||||
var proxyAndRecordSettings = new ProxyAndRecordSettings
|
|
||||||
{
|
{
|
||||||
SaveMapping = true,
|
_optionsMock = new Mock<IWireMockMiddlewareOptions>();
|
||||||
SaveMappingToFile = true
|
_optionsMock.SetupAllProperties();
|
||||||
};
|
_optionsMock.Setup(o => o.Mappings).Returns(_mappings);
|
||||||
|
_optionsMock.Setup(o => o.LogEntries).Returns(new ConcurrentObservableCollection<LogEntry>());
|
||||||
|
_optionsMock.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary<string, ScenarioState>());
|
||||||
|
_optionsMock.Setup(o => o.Logger.Warn(It.IsAny<string>(), It.IsAny<object[]>()));
|
||||||
|
_optionsMock.Setup(o => o.Logger.Error(It.IsAny<string>(), It.IsAny<object[]>()));
|
||||||
|
_optionsMock.Setup(o => o.Logger.DebugRequestResponse(It.IsAny<LogEntryModel>(), It.IsAny<bool>()));
|
||||||
|
|
||||||
var settings = new WireMockServerSettings
|
_requestMapperMock = new Mock<IOwinRequestMapper>();
|
||||||
|
_requestMapperMock.SetupAllProperties();
|
||||||
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1");
|
||||||
|
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
||||||
|
|
||||||
|
_responseMapperMock = new Mock<IOwinResponseMapper>();
|
||||||
|
_responseMapperMock.SetupAllProperties();
|
||||||
|
_responseMapperMock.Setup(m => m.MapAsync(It.IsAny<ResponseMessage>(), It.IsAny<IResponse>())).Returns(Task.FromResult(true));
|
||||||
|
|
||||||
|
_matcherMock = new Mock<IMappingMatcher>();
|
||||||
|
_matcherMock.SetupAllProperties();
|
||||||
|
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((new MappingMatcherResult(), new MappingMatcherResult()));
|
||||||
|
|
||||||
|
_contextMock = new Mock<IContext>();
|
||||||
|
|
||||||
|
_mappingMock = new Mock<IMapping>();
|
||||||
|
|
||||||
|
_sut = new WireMockMiddleware(null, _optionsMock.Object, _requestMapperMock.Object, _responseMapperMock.Object, _matcherMock.Object);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WireMockMiddleware_Invoke_NoMatch()
|
||||||
{
|
{
|
||||||
FileSystemHandler = fileSystemHandlerMock.Object,
|
// Act
|
||||||
Logger = logger.Object
|
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
||||||
};
|
|
||||||
|
|
||||||
var responseBuilder = Response.Create().WithProxy(proxyAndRecordSettings);
|
// Assert and Verify
|
||||||
|
_optionsMock.Verify(o => o.Logger.Warn(It.IsAny<string>(), It.IsAny<object[]>()), Times.Once);
|
||||||
|
|
||||||
_mappingMock.SetupGet(m => m.Provider).Returns(responseBuilder);
|
Expression<Func<ResponseMessage, bool>> match = r => (int)r.StatusCode == 404 && ((StatusModel)r.BodyData.BodyAsJson).Status == "No matching mapping found";
|
||||||
_mappingMock.SetupGet(m => m.Settings).Returns(settings);
|
_responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny<IResponse>()), Times.Once);
|
||||||
|
}
|
||||||
|
|
||||||
var newMappingFromProxy = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, settings, Request.Create(), Response.Create(), 0, null, null, null, null, null, false, null);
|
[Fact]
|
||||||
_mappingMock.Setup(m => m.ProvideResponseAsync(It.IsAny<RequestMessage>())).ReturnsAsync((new ResponseMessage(), newMappingFromProxy));
|
public async Task WireMockMiddleware_Invoke_IsAdminInterface_EmptyHeaders_401()
|
||||||
|
|
||||||
var requestBuilder = Request.Create().UsingAnyMethod();
|
|
||||||
_mappingMock.SetupGet(m => m.RequestMatcher).Returns(requestBuilder);
|
|
||||||
|
|
||||||
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
|
||||||
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
|
||||||
|
|
||||||
// Act
|
|
||||||
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
|
||||||
|
|
||||||
// Assert and Verify
|
|
||||||
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
|
||||||
|
|
||||||
_mappings.Count.Should().Be(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockMiddleware_Invoke_Mapping_Has_ProxyAndRecordSettings_And_SaveMapping_Is_False_But_WireMockServerSettings_SaveMapping_Is_True()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]>());
|
|
||||||
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
|
||||||
|
|
||||||
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
|
||||||
|
|
||||||
var fileSystemHandlerMock = new Mock<IFileSystemHandler>();
|
|
||||||
fileSystemHandlerMock.Setup(f => f.GetMappingFolder()).Returns("m");
|
|
||||||
|
|
||||||
var logger = new Mock<IWireMockLogger>();
|
|
||||||
|
|
||||||
var proxyAndRecordSettings = new ProxyAndRecordSettings
|
|
||||||
{
|
{
|
||||||
SaveMapping = false,
|
// Assign
|
||||||
SaveMappingToFile = false
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]>());
|
||||||
};
|
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
||||||
|
|
||||||
var settings = new WireMockServerSettings
|
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
||||||
|
_mappingMock.SetupGet(m => m.IsAdminInterface).Returns(true);
|
||||||
|
|
||||||
|
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
||||||
|
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
||||||
|
|
||||||
|
// Assert and Verify
|
||||||
|
_optionsMock.Verify(o => o.Logger.Error(It.IsAny<string>(), It.IsAny<object[]>()), Times.Once);
|
||||||
|
|
||||||
|
Expression<Func<ResponseMessage, bool>> match = r => (int)r.StatusCode == 401;
|
||||||
|
_responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny<IResponse>()), Times.Once);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WireMockMiddleware_Invoke_IsAdminInterface_MissingHeader_401()
|
||||||
{
|
{
|
||||||
FileSystemHandler = fileSystemHandlerMock.Object,
|
// Assign
|
||||||
Logger = logger.Object,
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]> { { "h", new[] { "x" } } });
|
||||||
ProxyAndRecordSettings = new ProxyAndRecordSettings
|
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
||||||
|
|
||||||
|
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
||||||
|
_mappingMock.SetupGet(m => m.IsAdminInterface).Returns(true);
|
||||||
|
|
||||||
|
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
||||||
|
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
||||||
|
|
||||||
|
// Assert and Verify
|
||||||
|
_optionsMock.Verify(o => o.Logger.Error(It.IsAny<string>(), It.IsAny<object[]>()), Times.Once);
|
||||||
|
|
||||||
|
Expression<Func<ResponseMessage, bool>> match = r => (int)r.StatusCode == 401;
|
||||||
|
_responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny<IResponse>()), Times.Once);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WireMockMiddleware_Invoke_RequestLogExpirationDurationIsDefined()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
_optionsMock.SetupGet(o => o.RequestLogExpirationDuration).Returns(1);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WireMockMiddleware_Invoke_Mapping_Has_ProxyAndRecordSettings_And_SaveMapping_Is_True()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]>());
|
||||||
|
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
||||||
|
|
||||||
|
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
||||||
|
|
||||||
|
var fileSystemHandlerMock = new Mock<IFileSystemHandler>();
|
||||||
|
fileSystemHandlerMock.Setup(f => f.GetMappingFolder()).Returns("m");
|
||||||
|
|
||||||
|
var logger = new Mock<IWireMockLogger>();
|
||||||
|
|
||||||
|
var proxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
{
|
{
|
||||||
SaveMapping = true,
|
SaveMapping = true,
|
||||||
SaveMappingToFile = true
|
SaveMappingToFile = true
|
||||||
}
|
};
|
||||||
};
|
|
||||||
|
|
||||||
var responseBuilder = Response.Create().WithProxy(proxyAndRecordSettings);
|
var settings = new WireMockServerSettings
|
||||||
|
{
|
||||||
|
FileSystemHandler = fileSystemHandlerMock.Object,
|
||||||
|
Logger = logger.Object
|
||||||
|
};
|
||||||
|
|
||||||
_mappingMock.SetupGet(m => m.Provider).Returns(responseBuilder);
|
var responseBuilder = Response.Create().WithProxy(proxyAndRecordSettings);
|
||||||
_mappingMock.SetupGet(m => m.Settings).Returns(settings);
|
|
||||||
|
|
||||||
var newMappingFromProxy = new Mapping(Guid.NewGuid(), _updatedAt, "my-title", "my-description", null, settings, Request.Create(), Response.Create(), 0, null, null, null, null, null, false, null);
|
_mappingMock.SetupGet(m => m.Provider).Returns(responseBuilder);
|
||||||
_mappingMock.Setup(m => m.ProvideResponseAsync(It.IsAny<RequestMessage>())).ReturnsAsync((new ResponseMessage(), newMappingFromProxy));
|
_mappingMock.SetupGet(m => m.Settings).Returns(settings);
|
||||||
|
|
||||||
var requestBuilder = Request.Create().UsingAnyMethod();
|
var newMappingFromProxy = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, settings, Request.Create(), Response.Create(), 0, null, null, null, null, null, false, null);
|
||||||
_mappingMock.SetupGet(m => m.RequestMatcher).Returns(requestBuilder);
|
_mappingMock.Setup(m => m.ProvideResponseAsync(It.IsAny<RequestMessage>())).ReturnsAsync((new ResponseMessage(), newMappingFromProxy));
|
||||||
|
|
||||||
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
var requestBuilder = Request.Create().UsingAnyMethod();
|
||||||
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
_mappingMock.SetupGet(m => m.RequestMatcher).Returns(requestBuilder);
|
||||||
|
|
||||||
// Act
|
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
||||||
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
||||||
|
|
||||||
// Assert and Verify
|
// Act
|
||||||
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
||||||
|
|
||||||
_mappings.Count.Should().Be(1);
|
// Assert and Verify
|
||||||
|
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||||
|
|
||||||
|
_mappings.Count.Should().Be(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WireMockMiddleware_Invoke_Mapping_Has_ProxyAndRecordSettings_And_SaveMapping_Is_False_But_WireMockServerSettings_SaveMapping_Is_True()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary<string, string[]>());
|
||||||
|
_requestMapperMock.Setup(m => m.MapAsync(It.IsAny<IRequest>(), It.IsAny<IWireMockMiddlewareOptions>())).ReturnsAsync(request);
|
||||||
|
|
||||||
|
_optionsMock.SetupGet(o => o.AuthenticationMatcher).Returns(new ExactMatcher());
|
||||||
|
|
||||||
|
var fileSystemHandlerMock = new Mock<IFileSystemHandler>();
|
||||||
|
fileSystemHandlerMock.Setup(f => f.GetMappingFolder()).Returns("m");
|
||||||
|
|
||||||
|
var logger = new Mock<IWireMockLogger>();
|
||||||
|
|
||||||
|
var proxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
|
{
|
||||||
|
SaveMapping = false,
|
||||||
|
SaveMappingToFile = false
|
||||||
|
};
|
||||||
|
|
||||||
|
var settings = new WireMockServerSettings
|
||||||
|
{
|
||||||
|
FileSystemHandler = fileSystemHandlerMock.Object,
|
||||||
|
Logger = logger.Object,
|
||||||
|
ProxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
|
{
|
||||||
|
SaveMapping = true,
|
||||||
|
SaveMappingToFile = true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var responseBuilder = Response.Create().WithProxy(proxyAndRecordSettings);
|
||||||
|
|
||||||
|
_mappingMock.SetupGet(m => m.Provider).Returns(responseBuilder);
|
||||||
|
_mappingMock.SetupGet(m => m.Settings).Returns(settings);
|
||||||
|
|
||||||
|
var newMappingFromProxy = new Mapping(Guid.NewGuid(), "my-title", "my-description", null, settings, Request.Create(), Response.Create(), 0, null, null, null, null, null, false, null);
|
||||||
|
_mappingMock.Setup(m => m.ProvideResponseAsync(It.IsAny<RequestMessage>())).ReturnsAsync((new ResponseMessage(), newMappingFromProxy));
|
||||||
|
|
||||||
|
var requestBuilder = Request.Create().UsingAnyMethod();
|
||||||
|
_mappingMock.SetupGet(m => m.RequestMatcher).Returns(requestBuilder);
|
||||||
|
|
||||||
|
var result = new MappingMatcherResult { Mapping = _mappingMock.Object };
|
||||||
|
_matcherMock.Setup(m => m.FindBestMatch(It.IsAny<RequestMessage>())).Returns((result, result));
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await _sut.Invoke(_contextMock.Object).ConfigureAwait(false);
|
||||||
|
|
||||||
|
// Assert and Verify
|
||||||
|
fileSystemHandlerMock.Verify(f => f.WriteMappingFile(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||||
|
|
||||||
|
_mappings.Count.Should().Be(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
## Creating a client certificate like client_cert.pfx
|
|
||||||
|
|
||||||
Follow the instructions to [create a root certificate](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-7.0#create-root-ca),
|
|
||||||
then [trust it](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-7.0#install-in-the-trusted-root)
|
|
||||||
and [create a child certificate from it](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-7.0#create-child-certificate-from-root-certificate).
|
|
||||||
|
|
||||||
Since the root certificate of `client_cert.pfx` is obviously not trusted automatically by cloning this repo, the tests in `WireMockServerTests.ClientCertificate.cs` set `WireMockServerSettings.AcceptAnyClientCertificate` to `true` so that tests pass even if the device hasn't trusted the root of `client_cert.pfx`.
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
using FluentAssertions;
|
|
||||||
using NFluent;
|
using NFluent;
|
||||||
using WireMock.Matchers;
|
using WireMock.Matchers;
|
||||||
using WireMock.Matchers.Request;
|
using WireMock.Matchers.Request;
|
||||||
using WireMock.Models;
|
using WireMock.Models;
|
||||||
using WireMock.Owin;
|
|
||||||
using WireMock.Types;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace WireMock.Net.Tests.RequestMatchers
|
namespace WireMock.Net.Tests.RequestMatchers
|
||||||
@@ -175,25 +172,5 @@ namespace WireMock.Net.Tests.RequestMatchers
|
|||||||
// Assert
|
// Assert
|
||||||
Check.That(score).IsEqualTo(1.0d);
|
Check.That(score).IsEqualTo(1.0d);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue #849
|
|
||||||
[Fact]
|
|
||||||
public void RequestMessageParamMatcher_With1ParamContainingComma_Using_QueryParameterMultipleValueSupport_NoComma()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var options = new WireMockMiddlewareOptions
|
|
||||||
{
|
|
||||||
QueryParameterMultipleValueSupport = QueryParameterMultipleValueSupport.NoComma
|
|
||||||
};
|
|
||||||
var requestMessage = new RequestMessage(options, new UrlDetails("http://localhost?query=SELECT id, value FROM table WHERE id = 1&test=42"), "GET", "127.0.0.1");
|
|
||||||
var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "query", false, "SELECT id, value FROM table WHERE id = 1");
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var result = new RequestMatchResult();
|
|
||||||
double score = matcher.GetMatchingScore(requestMessage, result);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
score.Should().Be(1.0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NFluent;
|
using NFluent;
|
||||||
using WireMock.Matchers;
|
using WireMock.Matchers;
|
||||||
using Xunit;
|
|
||||||
using WireMock.RequestBuilders;
|
|
||||||
using WireMock.Matchers.Request;
|
using WireMock.Matchers.Request;
|
||||||
using WireMock.Models;
|
using WireMock.Models;
|
||||||
|
using WireMock.RequestBuilders;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
namespace WireMock.Net.Tests
|
namespace WireMock.Net.Tests
|
||||||
{
|
{
|
||||||
@@ -19,11 +19,11 @@ namespace WireMock.Net.Tests
|
|||||||
// Assign
|
// Assign
|
||||||
var spec = Request.Create().WithPath("/path/a b").UsingAnyMethod();
|
var spec = Request.Create().WithPath("/path/a b").UsingAnyMethod();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var body = new BodyData();
|
var body = new BodyData();
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/path/a b"), "GET", ClientIp, body);
|
var request = new RequestMessage(new UrlDetails("http://localhost/path/a b"), "GET", ClientIp, body);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -31,17 +31,17 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Request_WithPath_WithHeader_Match()
|
public void Request_WithPath_WithHeader_Match()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingAnyMethod().WithHeader("X-toto", "tata");
|
var spec = Request.Create().WithPath("/foo").UsingAnyMethod().WithHeader("X-toto", "tata");
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var body = new BodyData
|
var body = new BodyData
|
||||||
{
|
{
|
||||||
BodyAsString = "abc"
|
BodyAsString = "abc"
|
||||||
};
|
};
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary<string, string[]> { { "X-toto", new[] { "tata" } } });
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary<string, string[]> { { "X-toto", new[] { "tata" } } });
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -49,13 +49,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Request_WithPath()
|
public void Request_WithPath()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo");
|
var spec = Request.Create().WithPath("/foo");
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -76,13 +76,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Request_WithPathFunc()
|
public void Request_WithPathFunc()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath(url => url.EndsWith("/foo"));
|
var spec = Request.Create().WithPath(url => url.EndsWith("/foo"));
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -90,13 +90,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Request_WithPathRegexMatcher_HasMatch()
|
public void Request_WithPathRegexMatcher_HasMatch()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath(new RegexMatcher("^/foo"));
|
var spec = Request.Create().WithPath(new RegexMatcher("^/foo"));
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo/bar"), "blabla", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo/bar"), "blabla", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -104,13 +104,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Request_WithPathRegexMatcher_HasNoMatch()
|
public void Request_WithPathRegexMatcher_HasNoMatch()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo");
|
var spec = Request.Create().WithPath("/foo");
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/bar"), "blabla", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/bar"), "blabla", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsNotEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsNotEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -126,10 +126,10 @@ namespace WireMock.Net.Tests
|
|||||||
};
|
};
|
||||||
var spec = Request.Create().WithPath(new RegexMatcher(pattern));
|
var spec = Request.Create().WithPath(new RegexMatcher(pattern));
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo/bar"), "blabla", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo/bar"), "blabla", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -137,17 +137,17 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_specify_requests_matching_given_path_and_method_delete()
|
public void Should_specify_requests_matching_given_path_and_method_delete()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingDelete();
|
var spec = Request.Create().WithPath("/foo").UsingDelete();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var body = new BodyData
|
var body = new BodyData
|
||||||
{
|
{
|
||||||
BodyAsString = "whatever"
|
BodyAsString = "whatever"
|
||||||
};
|
};
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "Delete", ClientIp, body);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "Delete", ClientIp, body);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -155,13 +155,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_specify_requests_matching_given_path_and_method_get()
|
public void Should_specify_requests_matching_given_path_and_method_get()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingGet();
|
var spec = Request.Create().WithPath("/foo").UsingGet();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -169,13 +169,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_specify_requests_matching_given_path_and_method_head()
|
public void Should_specify_requests_matching_given_path_and_method_head()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingHead();
|
var spec = Request.Create().WithPath("/foo").UsingHead();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "HEAD", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "HEAD", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -183,13 +183,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_specify_requests_matching_given_path_and_method_post()
|
public void Should_specify_requests_matching_given_path_and_method_post()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingPost();
|
var spec = Request.Create().WithPath("/foo").UsingPost();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -197,13 +197,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_specify_requests_matching_given_path_and_method_put()
|
public void Should_specify_requests_matching_given_path_and_method_put()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingPut();
|
var spec = Request.Create().WithPath("/foo").UsingPut();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -211,13 +211,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_specify_requests_matching_given_path_and_method_patch()
|
public void Should_specify_requests_matching_given_path_and_method_patch()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingPatch();
|
var spec = Request.Create().WithPath("/foo").UsingPatch();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PATCH", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PATCH", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsEqualTo(1.0);
|
||||||
}
|
}
|
||||||
@@ -225,13 +225,13 @@ namespace WireMock.Net.Tests
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void Should_exclude_requests_matching_given_path_but_not_http_method()
|
public void Should_exclude_requests_matching_given_path_but_not_http_method()
|
||||||
{
|
{
|
||||||
// given
|
// Arrange
|
||||||
var spec = Request.Create().WithPath("/foo").UsingPut();
|
var spec = Request.Create().WithPath("/foo").UsingPut();
|
||||||
|
|
||||||
// when
|
// Act
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "HEAD", ClientIp);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "HEAD", ClientIp);
|
||||||
|
|
||||||
// then
|
// Assert
|
||||||
var requestMatchResult = new RequestMatchResult();
|
var requestMatchResult = new RequestMatchResult();
|
||||||
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsNotEqualTo(1.0);
|
Check.That(spec.GetMatchingScore(request, requestMatchResult)).IsNotEqualTo(1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
30
test/WireMock.Net.Tests/RequestWithUrlTests.cs
Normal file
30
test/WireMock.Net.Tests/RequestWithUrlTests.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using FluentAssertions;
|
||||||
|
using WireMock.Matchers;
|
||||||
|
using Xunit;
|
||||||
|
using WireMock.RequestBuilders;
|
||||||
|
using WireMock.Matchers.Request;
|
||||||
|
using WireMock.Models;
|
||||||
|
using WireMock.Util;
|
||||||
|
|
||||||
|
namespace WireMock.Net.Tests
|
||||||
|
{
|
||||||
|
public class RequestWithUrlTests
|
||||||
|
{
|
||||||
|
private const string ClientIp = "::1";
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Request_WithUrl_Regex()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var spec = Request.Create().WithUrl(new RegexMatcher("(some\\/service\\/v1\\/name)([?]{1})(param.source=SYSTEM){1}([&]{1})(param.id=123457890){1}$")).UsingAnyMethod();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var body = new BodyData();
|
||||||
|
var request = new RequestMessage(new UrlDetails("https://localhost/some/service/v1/name?param.source=SYSTEM¶m.id=123457890"), "POST", ClientIp, body);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
var requestMatchResult = new RequestMatchResult();
|
||||||
|
spec.GetMatchingScore(request, requestMatchResult).Should().Be(1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -108,7 +108,7 @@ public class ResponseWithHandlebarsJsonPathTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson!);
|
JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson);
|
||||||
Check.That(j["x"].Value<long>()).Equals(99);
|
Check.That(j["x"].Value<long>()).Equals(99);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class ResponseWithHandlebarsRandomTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(ReplaceNodeOptions.Evaluate, JTokenType.Integer)]
|
[InlineData(ReplaceNodeOptions.None, JTokenType.Integer)]
|
||||||
//[InlineData(ReplaceNodeOptions.Bool, JTokenType.String)]
|
//[InlineData(ReplaceNodeOptions.Bool, JTokenType.String)]
|
||||||
//[InlineData(ReplaceNodeOptions.Integer, JTokenType.Integer)]
|
//[InlineData(ReplaceNodeOptions.Integer, JTokenType.Integer)]
|
||||||
//[InlineData(ReplaceNodeOptions.Bool | ReplaceNodeOptions.Integer, JTokenType.Integer)]
|
//[InlineData(ReplaceNodeOptions.Bool | ReplaceNodeOptions.Integer, JTokenType.Integer)]
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ using WireMock.Settings;
|
|||||||
using WireMock.Types;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using System.Globalization;
|
|
||||||
using CultureAwareTesting.xUnit;
|
|
||||||
#if NET452
|
#if NET452
|
||||||
using Microsoft.Owin;
|
using Microsoft.Owin;
|
||||||
#else
|
#else
|
||||||
@@ -26,7 +24,6 @@ namespace WireMock.Net.Tests.ResponseBuilders;
|
|||||||
|
|
||||||
public class ResponseWithTransformerTests
|
public class ResponseWithTransformerTests
|
||||||
{
|
{
|
||||||
private readonly Mock<IFileSystemHandler> _filesystemHandlerMock;
|
|
||||||
private readonly WireMockServerSettings _settings = new();
|
private readonly WireMockServerSettings _settings = new();
|
||||||
private const string ClientIp = "::1";
|
private const string ClientIp = "::1";
|
||||||
|
|
||||||
@@ -36,10 +33,10 @@ public class ResponseWithTransformerTests
|
|||||||
{
|
{
|
||||||
_mappingMock = new Mock<IMapping>();
|
_mappingMock = new Mock<IMapping>();
|
||||||
|
|
||||||
_filesystemHandlerMock = new Mock<IFileSystemHandler>(MockBehavior.Strict);
|
var filesystemHandlerMock = new Mock<IFileSystemHandler>(MockBehavior.Strict);
|
||||||
_filesystemHandlerMock.Setup(fs => fs.ReadResponseBodyAsString(It.IsAny<string>())).Returns("abc");
|
filesystemHandlerMock.Setup(fs => fs.ReadResponseBodyAsString(It.IsAny<string>())).Returns("abc");
|
||||||
|
|
||||||
_settings.FileSystemHandler = _filesystemHandlerMock.Object;
|
_settings.FileSystemHandler = filesystemHandlerMock.Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -336,7 +333,7 @@ public class ResponseWithTransformerTests
|
|||||||
// Assert
|
// Assert
|
||||||
Check.That(response.Message.BodyData!.BodyAsString).Equals("test");
|
Check.That(response.Message.BodyData!.BodyAsString).Equals("test");
|
||||||
Check.That(response.Message.Headers).ContainsKey("x");
|
Check.That(response.Message.Headers).ContainsKey("x");
|
||||||
Check.That(response.Message.Headers!["x"]).Contains("text/plain");
|
Check.That(response.Message.Headers["x"]).Contains("text/plain");
|
||||||
Check.That(response.Message.Headers["x"]).Contains("http://localhost/foo");
|
Check.That(response.Message.Headers["x"]).Contains("http://localhost/foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +358,7 @@ public class ResponseWithTransformerTests
|
|||||||
// Assert
|
// Assert
|
||||||
Check.That(response.Message.BodyData!.BodyAsString).Equals("test");
|
Check.That(response.Message.BodyData!.BodyAsString).Equals("test");
|
||||||
Check.That(response.Message.Headers).ContainsKey("x");
|
Check.That(response.Message.Headers).ContainsKey("x");
|
||||||
Check.That(response.Message.Headers!["x"]).Contains("text/plain");
|
Check.That(response.Message.Headers["x"]).Contains("text/plain");
|
||||||
Check.That(response.Message.Headers["x"]).Contains("http://localhost/foo");
|
Check.That(response.Message.Headers["x"]).Contains("http://localhost/foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,7 +394,7 @@ public class ResponseWithTransformerTests
|
|||||||
public async Task Response_ProvideResponse_Transformer_WithBodyAsJson_ResultAsObject(TransformerType transformerType)
|
public async Task Response_ProvideResponse_Transformer_WithBodyAsJson_ResultAsObject(TransformerType transformerType)
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
string jsonString = "{ \"id\": 42, \"things\": [ { \"name\": \"RequiredThing\" }, { \"name\": \"WireMock\" } ] }";
|
string jsonString = "{ \"things\": [ { \"name\": \"RequiredThing\" }, { \"name\": \"WireMock\" } ] }";
|
||||||
var bodyData = new BodyData
|
var bodyData = new BodyData
|
||||||
{
|
{
|
||||||
BodyAsJson = JsonConvert.DeserializeObject(jsonString),
|
BodyAsJson = JsonConvert.DeserializeObject(jsonString),
|
||||||
@@ -414,49 +411,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson)).Equals("{\"x\":\"test /foo_object\"}");
|
Check.That(JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson)).Equals("{\"x\":\"test /foo_object\"}");
|
||||||
}
|
|
||||||
|
|
||||||
[CulturedTheory("en-US")]
|
|
||||||
[InlineData(TransformerType.Handlebars, "{ \"id\": 42 }", "{\"x\":\"test 42\",\"y\":42}")]
|
|
||||||
[InlineData(TransformerType.Scriban, "{ \"id\": 42 }", "{\"x\":\"test 42\",\"y\":42}")]
|
|
||||||
[InlineData(TransformerType.ScribanDotLiquid, "{ \"id\": 42 }", "{\"x\":\"test 42\",\"y\":42}")]
|
|
||||||
[InlineData(TransformerType.Handlebars, "{ \"id\": true }", "{\"x\":\"test True\",\"y\":true}")]
|
|
||||||
[InlineData(TransformerType.Scriban, "{ \"id\": true }", "{\"x\":\"test True\",\"y\":true}")]
|
|
||||||
[InlineData(TransformerType.ScribanDotLiquid, "{ \"id\": true }", "{\"x\":\"test True\",\"y\":true}")]
|
|
||||||
[InlineData(TransformerType.Handlebars, "{ \"id\": 0.005 }", "{\"x\":\"test 0.005\",\"y\":0.005}")]
|
|
||||||
[InlineData(TransformerType.Scriban, "{ \"id\": 0.005 }", "{\"x\":\"test 0.005\",\"y\":0.005}")]
|
|
||||||
[InlineData(TransformerType.ScribanDotLiquid, "{ \"id\": 0.005 }", "{\"x\":\"test 0.005\",\"y\":0.005}")]
|
|
||||||
public async Task Response_ProvideResponse_Transformer_WithBodyAsJson_KeepType(TransformerType transformerType, string jsonString, string expected)
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var culture = CultureInfo.CreateSpecificCulture("en-US");
|
|
||||||
var settings = new WireMockServerSettings
|
|
||||||
{
|
|
||||||
FileSystemHandler = _filesystemHandlerMock.Object,
|
|
||||||
Culture = culture
|
|
||||||
};
|
|
||||||
var jsonSettings = new JsonSerializerSettings
|
|
||||||
{
|
|
||||||
Culture = culture
|
|
||||||
};
|
|
||||||
var bodyData = new BodyData
|
|
||||||
{
|
|
||||||
BodyAsJson = JsonConvert.DeserializeObject(jsonString, jsonSettings),
|
|
||||||
DetectedBodyType = BodyType.Json,
|
|
||||||
Encoding = Encoding.UTF8
|
|
||||||
};
|
|
||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo_object"), "POST", ClientIp, bodyData);
|
|
||||||
|
|
||||||
var responseBuilder = Response.Create()
|
|
||||||
.WithBodyAsJson(new { x = "test {{request.BodyAsJson.id}}", y = "{{request.BodyAsJson.id}}" })
|
|
||||||
.WithTransformer(transformerType);
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, settings).ConfigureAwait(false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson).Should().Be(expected);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -476,7 +431,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson).Should().Be("[{\"x\":\"test\"}]");
|
JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson).Should().Be("[{\"x\":\"test\"}]");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -497,7 +452,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson).Should().Be("[{\"x\":\"test\"}]");
|
JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson).Should().Be("[{\"x\":\"test\"}]");
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Theory]
|
//[Theory]
|
||||||
@@ -533,15 +488,15 @@ public class ResponseWithTransformerTests
|
|||||||
[InlineData(TransformerType.Handlebars, "\"a\"", "\"a\"")]
|
[InlineData(TransformerType.Handlebars, "\"a\"", "\"a\"")]
|
||||||
[InlineData(TransformerType.Handlebars, "\" \"", "\" \"")]
|
[InlineData(TransformerType.Handlebars, "\" \"", "\" \"")]
|
||||||
[InlineData(TransformerType.Handlebars, "\"'\"", "\"'\"")]
|
[InlineData(TransformerType.Handlebars, "\"'\"", "\"'\"")]
|
||||||
[InlineData(TransformerType.Handlebars, "\"false\"", "\"false\"")]
|
[InlineData(TransformerType.Handlebars, "\"false\"", "false")] // bool is special
|
||||||
[InlineData(TransformerType.Handlebars, "false", "false")]
|
[InlineData(TransformerType.Handlebars, "false", "false")]
|
||||||
[InlineData(TransformerType.Handlebars, "\"true\"", "\"true\"")]
|
[InlineData(TransformerType.Handlebars, "\"true\"", "true")] // bool is special
|
||||||
[InlineData(TransformerType.Handlebars, "true", "true")]
|
[InlineData(TransformerType.Handlebars, "true", "true")]
|
||||||
[InlineData(TransformerType.Handlebars, "\"-42\"", "\"-42\"")]
|
[InlineData(TransformerType.Handlebars, "\"-42\"", "-42")] // todo
|
||||||
[InlineData(TransformerType.Handlebars, "-42", "-42")]
|
[InlineData(TransformerType.Handlebars, "-42", "-42")]
|
||||||
[InlineData(TransformerType.Handlebars, "\"2147483647\"", "\"2147483647\"")]
|
[InlineData(TransformerType.Handlebars, "\"2147483647\"", "2147483647")] // todo
|
||||||
[InlineData(TransformerType.Handlebars, "2147483647", "2147483647")]
|
[InlineData(TransformerType.Handlebars, "2147483647", "2147483647")]
|
||||||
[InlineData(TransformerType.Handlebars, "\"9223372036854775807\"", "\"9223372036854775807\"")]
|
[InlineData(TransformerType.Handlebars, "\"9223372036854775807\"", "9223372036854775807")] // todo
|
||||||
[InlineData(TransformerType.Handlebars, "9223372036854775807", "9223372036854775807")]
|
[InlineData(TransformerType.Handlebars, "9223372036854775807", "9223372036854775807")]
|
||||||
public async Task Response_ProvideResponse_Transformer_WithBodyAsJson_And_ReplaceNodeOptionsKeep(TransformerType transformerType, string value, string expected)
|
public async Task Response_ProvideResponse_Transformer_WithBodyAsJson_And_ReplaceNodeOptionsKeep(TransformerType transformerType, string value, string expected)
|
||||||
{
|
{
|
||||||
@@ -556,13 +511,50 @@ public class ResponseWithTransformerTests
|
|||||||
|
|
||||||
var responseBuilder = Response.Create()
|
var responseBuilder = Response.Create()
|
||||||
.WithBodyAsJson(new { text = "{{request.bodyAsJson.x}}" })
|
.WithBodyAsJson(new { text = "{{request.bodyAsJson.x}}" })
|
||||||
.WithTransformer(transformerType, false, ReplaceNodeOptions.Evaluate);
|
.WithTransformer(transformerType, false, ReplaceNodeOptions.None);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson).Should().Be($"{{\"text\":{expected}}}");
|
JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson).Should().Be($"{{\"text\":{expected}}}");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"\"", "\"\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"a\"", "\"a\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\" \"", "\" \"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"'\"", "\"'\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"false\"", "false")] // bool is special
|
||||||
|
[InlineData(TransformerType.Handlebars, "false", "false")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"true\"", "true")] // bool is special
|
||||||
|
[InlineData(TransformerType.Handlebars, "true", "true")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"-42\"", "\"-42\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "-42", "\"-42\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"2147483647\"", "\"2147483647\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "2147483647", "\"2147483647\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "\"9223372036854775807\"", "\"9223372036854775807\"")]
|
||||||
|
[InlineData(TransformerType.Handlebars, "9223372036854775807", "\"9223372036854775807\"")]
|
||||||
|
public async Task Response_ProvideResponse_Transformer_WithBodyAsJsonWithExtraQuotes_AlwaysMakesString(TransformerType transformerType, string value, string expected)
|
||||||
|
{
|
||||||
|
string jsonString = $"{{ \"x\": {value} }}";
|
||||||
|
var bodyData = new BodyData
|
||||||
|
{
|
||||||
|
BodyAsJson = JsonConvert.DeserializeObject(jsonString),
|
||||||
|
DetectedBodyType = BodyType.Json,
|
||||||
|
Encoding = Encoding.UTF8
|
||||||
|
};
|
||||||
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo_object"), "POST", ClientIp, bodyData);
|
||||||
|
|
||||||
|
var responseBuilder = Response.Create()
|
||||||
|
.WithBodyAsJson(new { text = "\"{{request.bodyAsJson.x}}\"" })
|
||||||
|
.WithTransformer(transformerType);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson).Should().Be($"{{\"text\":{expected}}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -589,7 +581,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson)).Equals("[\"first\",\"/foo_array\",\"test 1\",\"test 2\",\"last\"]");
|
Check.That(JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson)).Equals("[\"first\",\"/foo_array\",\"test 1\",\"test 2\",\"last\"]");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -606,7 +598,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(response.Message.BodyData!.BodyAsFile).Equals(@"c:\1\test.xml");
|
Check.That(response.Message.BodyData.BodyAsFile).Equals(@"c:\1\test.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory(Skip = @"Does not work in Scriban --> c:\\[""1""]\\test.xml")]
|
[Theory(Skip = @"Does not work in Scriban --> c:\\[""1""]\\test.xml")]
|
||||||
@@ -625,7 +617,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(response.Message.BodyData!.BodyAsFile).Equals(@"c:\1\test.xml");
|
Check.That(response.Message.BodyData.BodyAsFile).Equals(@"c:\1\test.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -650,7 +642,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(response.Message.BodyData!.BodyAsFile).Equals(@"c:\1\test.xml");
|
Check.That(response.Message.BodyData.BodyAsFile).Equals(@"c:\1\test.xml");
|
||||||
Check.That(response.Message.BodyData.DetectedBodyType).Equals(BodyType.String);
|
Check.That(response.Message.BodyData.DetectedBodyType).Equals(BodyType.String);
|
||||||
Check.That(response.Message.BodyData!.BodyAsString).Equals("<xml MyUniqueNumber=\"1\"></xml>");
|
Check.That(response.Message.BodyData!.BodyAsString).Equals("<xml MyUniqueNumber=\"1\"></xml>");
|
||||||
}
|
}
|
||||||
@@ -679,15 +671,14 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson)).Equals("\"test\"");
|
Check.That(JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson)).Equals("\"test\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact(Skip = "todo...")]
|
[Fact(Skip = "todo...")]
|
||||||
//[Fact]
|
|
||||||
public async Task Response_ProvideResponse_Handlebars_WithBodyAsJson_ResultAsTemplatedString()
|
public async Task Response_ProvideResponse_Handlebars_WithBodyAsJson_ResultAsTemplatedString()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
string jsonString = "{ \"name\": \"WireMock\", \"id\": 12345 }";
|
string jsonString = "{ \"name\": \"WireMock\" }";
|
||||||
var bodyData = new BodyData
|
var bodyData = new BodyData
|
||||||
{
|
{
|
||||||
BodyAsJson = JsonConvert.DeserializeObject(jsonString),
|
BodyAsJson = JsonConvert.DeserializeObject(jsonString),
|
||||||
@@ -697,14 +688,14 @@ public class ResponseWithTransformerTests
|
|||||||
var request = new RequestMessage(new UrlDetails("http://localhost/foo_object"), "POST", ClientIp, bodyData);
|
var request = new RequestMessage(new UrlDetails("http://localhost/foo_object"), "POST", ClientIp, bodyData);
|
||||||
|
|
||||||
var responseBuilder = Response.Create()
|
var responseBuilder = Response.Create()
|
||||||
.WithBodyAsJson("{{{request.BodyAsJson.name}}}")
|
.WithBodyAsJson("{{{request.BodyAsJson}}}")
|
||||||
.WithTransformer();
|
.WithTransformer();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson)).Equals("{\"name\":\"WireMock\"}");
|
Check.That(JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson)).Equals("{\"name\":\"WireMock\"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory(Skip = "{{{ }}} Does not work in Scriban")]
|
[Theory(Skip = "{{{ }}} Does not work in Scriban")]
|
||||||
@@ -730,7 +721,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(JsonConvert.SerializeObject(response.Message.BodyData!.BodyAsJson)).Equals("{\"name\":\"WireMock\"}");
|
Check.That(JsonConvert.SerializeObject(response.Message.BodyData.BodyAsJson)).Equals("{\"name\":\"WireMock\"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -758,7 +749,7 @@ public class ResponseWithTransformerTests
|
|||||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
response.Message.BodyData!.BodyAsString.Should().Be(text);
|
response.Message.BodyData.BodyAsString.Should().Be(text);
|
||||||
response.Message.BodyData.Encoding.Should().Be(enc);
|
response.Message.BodyData.Encoding.Should().Be(enc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,6 @@ namespace WireMock.Net.Tests.Serialization;
|
|||||||
|
|
||||||
public class MappingConverterTests
|
public class MappingConverterTests
|
||||||
{
|
{
|
||||||
private readonly DateTime _updatedAt = new(2022, 12, 4);
|
|
||||||
private readonly WireMockServerSettings _settings = new();
|
private readonly WireMockServerSettings _settings = new();
|
||||||
|
|
||||||
private readonly MappingConverter _sut;
|
private readonly MappingConverter _sut;
|
||||||
@@ -53,7 +52,7 @@ public class MappingConverterTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 0, null, null, null, null, webhooks, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 0, null, null, null, null, webhooks, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -123,7 +122,7 @@ public class MappingConverterTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 0, null, null, null, null, webhooks, true, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 0, null, null, null, null, webhooks, true, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -158,7 +157,7 @@ public class MappingConverterTests
|
|||||||
var description = "my-description";
|
var description = "my-description";
|
||||||
var request = Request.Create();
|
var request = Request.Create();
|
||||||
var response = Response.Create();
|
var response = Response.Create();
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, title, description, null, _settings, request, response, 0, null, null, null, null, null, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), title, description, null, _settings, request, response, 0, null, null, null, null, null, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -175,7 +174,7 @@ public class MappingConverterTests
|
|||||||
// Assign
|
// Assign
|
||||||
var request = Request.Create();
|
var request = Request.Create();
|
||||||
var response = Response.Create().WithBodyAsJson(new { x = "x" }).WithTransformer();
|
var response = Response.Create().WithBodyAsJson(new { x = "x" }).WithTransformer();
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -201,7 +200,7 @@ public class MappingConverterTests
|
|||||||
End = end,
|
End = end,
|
||||||
TTL = ttl
|
TTL = ttl
|
||||||
};
|
};
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, timeSettings);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, timeSettings);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -229,7 +228,7 @@ public class MappingConverterTests
|
|||||||
{
|
{
|
||||||
var request = Request.Create();
|
var request = Request.Create();
|
||||||
var response = Response.Create().WithDelay(test.Delay);
|
var response = Response.Create().WithDelay(test.Delay);
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, string.Empty, _settings, request, response, 42, null, null, null, null, null, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, string.Empty, _settings, request, response, 42, null, null, null, null, null, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -247,7 +246,7 @@ public class MappingConverterTests
|
|||||||
var delay = 1000;
|
var delay = 1000;
|
||||||
var request = Request.Create();
|
var request = Request.Create();
|
||||||
var response = Response.Create().WithDelay(delay);
|
var response = Response.Create().WithDelay(delay);
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -264,7 +263,7 @@ public class MappingConverterTests
|
|||||||
int minimumDelay = 1000;
|
int minimumDelay = 1000;
|
||||||
var request = Request.Create();
|
var request = Request.Create();
|
||||||
var response = Response.Create().WithRandomDelay(minimumDelay);
|
var response = Response.Create().WithRandomDelay(minimumDelay);
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
@@ -284,7 +283,7 @@ public class MappingConverterTests
|
|||||||
int maximumDelay = 2000;
|
int maximumDelay = 2000;
|
||||||
var request = Request.Create();
|
var request = Request.Create();
|
||||||
var response = Response.Create().WithRandomDelay(minimumDelay, maximumDelay);
|
var response = Response.Create().WithRandomDelay(minimumDelay, maximumDelay);
|
||||||
var mapping = new Mapping(Guid.NewGuid(), _updatedAt, string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
var mapping = new Mapping(Guid.NewGuid(), string.Empty, string.Empty, null, _settings, request, response, 42, null, null, null, null, null, false, null);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var model = _sut.ToMappingModel(mapping);
|
var model = _sut.ToMappingModel(mapping);
|
||||||
|
|||||||
@@ -25,12 +25,9 @@ public class ProxyMappingConverterTests
|
|||||||
var guidUtilsMock = new Mock<IGuidUtils>();
|
var guidUtilsMock = new Mock<IGuidUtils>();
|
||||||
guidUtilsMock.Setup(g => g.NewGuid()).Returns(Guid.Parse("ff55ac0a-fea9-4d7b-be74-5e483a2c1305"));
|
guidUtilsMock.Setup(g => g.NewGuid()).Returns(Guid.Parse("ff55ac0a-fea9-4d7b-be74-5e483a2c1305"));
|
||||||
|
|
||||||
var dateTimeUtilsMock = new Mock<IDateTimeUtils>();
|
|
||||||
dateTimeUtilsMock.SetupGet(d => d.UtcNow).Returns(new DateTime(2022, 12, 4));
|
|
||||||
|
|
||||||
_mappingConverter = new MappingConverter(new MatcherMapper(_settings));
|
_mappingConverter = new MappingConverter(new MatcherMapper(_settings));
|
||||||
|
|
||||||
_sut = new ProxyMappingConverter(_settings, guidUtilsMock.Object, dateTimeUtilsMock.Object);
|
_sut = new ProxyMappingConverter(_settings, guidUtilsMock.Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Guid": "ff55ac0a-fea9-4d7b-be74-5e483a2c1305",
|
"Guid": "ff55ac0a-fea9-4d7b-be74-5e483a2c1305",
|
||||||
"UpdatedAt": "2022-12-04T00:00:00",
|
|
||||||
"Title": "my title",
|
"Title": "my title",
|
||||||
"Description": "my description",
|
"Description": "my description",
|
||||||
"Priority": -2000000,
|
"Priority": -2000000,
|
||||||
|
|||||||
@@ -1,59 +1,52 @@
|
|||||||
|
using System;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
using HandlebarsDotNet;
|
||||||
using Moq;
|
using Moq;
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
using WireMock.Settings;
|
|
||||||
using WireMock.Transformers.Handlebars;
|
using WireMock.Transformers.Handlebars;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace WireMock.Net.Tests.Transformers.Handlebars;
|
namespace WireMock.Net.Tests.Transformers.Handlebars
|
||||||
|
|
||||||
public class HandlebarsContextFactoryTests
|
|
||||||
{
|
{
|
||||||
private readonly Mock<IFileSystemHandler> _fileSystemHandlerMock = new();
|
public class HandlebarsContextFactoryTests
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void Create_WithNullAction_DoesNotInvokeAction()
|
|
||||||
{
|
{
|
||||||
// Arrange
|
private readonly Mock<IFileSystemHandler> _fileSystemHandlerMock = new Mock<IFileSystemHandler>();
|
||||||
var settings = new WireMockServerSettings
|
|
||||||
|
[Fact]
|
||||||
|
public void Create_WithNullAction_DoesNotInvokeAction()
|
||||||
{
|
{
|
||||||
FileSystemHandler = _fileSystemHandlerMock.Object
|
// Arrange
|
||||||
};
|
var sut = new HandlebarsContextFactory(_fileSystemHandlerMock.Object, null);
|
||||||
var sut = new HandlebarsContextFactory(settings);
|
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = sut.Create();
|
var result = sut.Create();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
result.Should().NotBeNull();
|
result.Should().NotBeNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Create_WithAction_InvokesAction()
|
public void Create_WithAction_InvokesAction()
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
int num = 0;
|
|
||||||
var settings = new WireMockServerSettings
|
|
||||||
{
|
{
|
||||||
FileSystemHandler = _fileSystemHandlerMock.Object,
|
// Arrange
|
||||||
HandlebarsRegistrationCallback = (ctx, fs) =>
|
int num = 0;
|
||||||
|
Action<IHandlebars, IFileSystemHandler> action = (ctx, fs) =>
|
||||||
{
|
{
|
||||||
ctx.Should().NotBeNull();
|
ctx.Should().NotBeNull();
|
||||||
fs.Should().NotBeNull();
|
fs.Should().NotBeNull();
|
||||||
|
|
||||||
num++;
|
num++;
|
||||||
}
|
};
|
||||||
};
|
var sut = new HandlebarsContextFactory(_fileSystemHandlerMock.Object, action);
|
||||||
|
|
||||||
var sut = new HandlebarsContextFactory(settings);
|
// Act
|
||||||
|
var result = sut.Create();
|
||||||
|
|
||||||
// Act
|
// Assert
|
||||||
var result = sut.Create();
|
result.Should().NotBeNull();
|
||||||
|
|
||||||
// Assert
|
// Verify
|
||||||
result.Should().NotBeNull();
|
num.Should().Be(1);
|
||||||
|
}
|
||||||
// Verify
|
|
||||||
num.Should().Be(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ public class QueryStringParserTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Parse_With1ParamContainingSpacesSingleQuoteAndEqualSign()
|
public void Parse_With1ParamContainingSpacesAndEqualSign()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
string query = "?q=SELECT Id from User where username='user@gmail.com'";
|
string query = "?q=SELECT Id from User where username='user@gmail.com'";
|
||||||
@@ -287,22 +287,6 @@ public class QueryStringParserTests
|
|||||||
result["q"].Should().Equal(new WireMockList<string>("SELECT Id from User where username='user@gmail.com'"));
|
result["q"].Should().Equal(new WireMockList<string>("SELECT Id from User where username='user@gmail.com'"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue #849
|
|
||||||
[Fact]
|
|
||||||
public void Parse_With1ParamContainingComma_Using_QueryParameterMultipleValueSupport_NoComma()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
string query = "?query=SELECT id, value FROM table WHERE id = 1&test=42";
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var result = QueryStringParser.Parse(query, QueryParameterMultipleValueSupport.NoComma);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
result.Count.Should().Be(2);
|
|
||||||
result["query"].Should().Equal(new WireMockList<string>("SELECT id, value FROM table WHERE id = 1"));
|
|
||||||
result["test"].Should().Equal(new WireMockList<string>("42"));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Parse_WithComplex()
|
public void Parse_WithComplex()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net452;net461;netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>net452;net461;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<AssemblyName>WireMock.Net.Tests</AssemblyName>
|
<AssemblyName>WireMock.Net.Tests</AssemblyName>
|
||||||
@@ -20,10 +20,6 @@
|
|||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net452' or '$(TargetFramework)' == 'net461'">
|
|
||||||
<DefineConstants>NETFRAMEWORK</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.FluentAssertions\WireMock.Net.FluentAssertions.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.FluentAssertions\WireMock.Net.FluentAssertions.csproj" />
|
||||||
@@ -35,19 +31,17 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Codecov" Version="1.13.0" />
|
<PackageReference Include="Codecov" Version="1.13.0" />
|
||||||
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
|
<PackageReference Include="coverlet.msbuild" Version="3.1.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="CultureAwareTesting.xUnit" Version="0.0.1" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
|
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.core" Version="2.4.1" />
|
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
<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.2.0">
|
<PackageReference Include="coverlet.collector" Version="3.1.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>
|
||||||
@@ -58,7 +52,7 @@
|
|||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="NFluent" Version="2.8.0" />
|
<PackageReference Include="NFluent" Version="2.8.0" />
|
||||||
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.23" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.19" />
|
||||||
<PackageReference Include="AnyOf" Version="0.3.0" />
|
<PackageReference Include="AnyOf" Version="0.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -74,7 +68,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
|
<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
|
||||||
<PackageReference Include="System.Net.Http.Json" Version="3.2.1" />
|
<PackageReference Include="System.Net.Http.Json" Version="3.2.1" />
|
||||||
<PackageReference Include="JsonConverter.System.Text.Json" Version="0.3.0" />
|
<PackageReference Include="JsonConverter.System.Text.Json" Version="0.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -96,10 +90,6 @@
|
|||||||
<None Update="__admin\mappings\subdirectory\*.xml">
|
<None Update="__admin\mappings\subdirectory\*.xml">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="client_cert.pfx">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DependentUpon>WireMockServerTests.ClientCertificate.cs</DependentUpon>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using System.Net;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using FluentAssertions;
|
|
||||||
using Moq;
|
using Moq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NFluent;
|
using NFluent;
|
||||||
@@ -375,26 +374,6 @@ public class WireMockServerAdminTests
|
|||||||
server.Stop();
|
server.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task WireMockServer_Admin_Logging_SetMaxRequestLogCount_To_0_Should_Not_AddLogging()
|
|
||||||
{
|
|
||||||
// Assign
|
|
||||||
var client = new HttpClient();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var server = WireMockServer.Start();
|
|
||||||
server.SetMaxRequestLogCount(0);
|
|
||||||
|
|
||||||
await client.GetAsync("http://localhost:" + server.Port + "/foo1").ConfigureAwait(false);
|
|
||||||
await client.GetAsync("http://localhost:" + server.Port + "/foo2").ConfigureAwait(false);
|
|
||||||
await client.GetAsync("http://localhost:" + server.Port + "/foo3").ConfigureAwait(false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
server.LogEntries.Should().BeEmpty();
|
|
||||||
|
|
||||||
server.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void WireMockServer_Admin_WatchStaticMappings()
|
public void WireMockServer_Admin_WatchStaticMappings()
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user