mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-25 02:21:00 +01:00
Update NuGet packages (#728)
* Update NuGet pacakges * . * . * 3 * FluentBuilder * 10000 * typo * f * . * net6 * fix build * t * t2 * net6 * . * <PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" /> * . * ... * . * fix
This commit is contained in:
@@ -98,6 +98,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Org.RestClient", "
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Org.Abstractions", "src\WireMock.Org.Abstractions\WireMock.Org.Abstractions.csproj", "{3BA5109E-5F30-4CC2-B699-02EC82560AA6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Org.Abstractions", "src\WireMock.Org.Abstractions\WireMock.Org.Abstractions.csproj", "{3BA5109E-5F30-4CC2-B699-02EC82560AA6}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET6", "examples\WireMock.Net.Console.NET6\WireMock.Net.Console.NET6.csproj", "{2215055B-594E-4C2F-99B2-6DF337F02893}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -228,6 +230,10 @@ Global
|
|||||||
{3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Release|Any CPU.Build.0 = Release|Any CPU
|
{3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -266,6 +272,7 @@ Global
|
|||||||
{5B64F6CA-BF6B-4F67-BB2A-9C47E441703E} = {7EFB2C5B-1BB2-4AAF-BC9F-216ED80C594D}
|
{5B64F6CA-BF6B-4F67-BB2A-9C47E441703E} = {7EFB2C5B-1BB2-4AAF-BC9F-216ED80C594D}
|
||||||
{08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
{08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
{3BA5109E-5F30-4CC2-B699-02EC82560AA6} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
{3BA5109E-5F30-4CC2-B699-02EC82560AA6} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
|
||||||
|
{2215055B-594E-4C2F-99B2-6DF337F02893} = {985E0ADB-D4B4-473A-AA40-567E279B7946}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
|
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ variables:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework netcoreapp3.1 --logger trx
|
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework net6.0 --logger trx
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
testRunner: VSTest
|
testRunner: VSTest
|
||||||
|
|||||||
@@ -35,21 +35,21 @@ jobs:
|
|||||||
projectKey: 'WireMock-Net_WireMock.Net'
|
projectKey: 'WireMock-Net_WireMock.Net'
|
||||||
projectName: 'WireMock.Net'
|
projectName: 'WireMock.Net'
|
||||||
extraProperties: |
|
extraProperties: |
|
||||||
sonar.cs.opencover.reportsPaths=**/coverage.netcoreapp3.1.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 netcoreapp3.1'
|
arguments: '--configuration Debug --framework net6.0'
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'Execute Unit tests'
|
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 netcoreapp3.1 --collect:"XPlat Code Coverage" --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover'
|
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'
|
||||||
@@ -64,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.netcoreapp3.1.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
|
||||||
@@ -76,13 +76,13 @@ jobs:
|
|||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish coverage file
|
displayName: Publish coverage file
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '/home/vsts/work/1/s/test/WireMock.Net.Tests/coverage.netcoreapp3.1.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
|
||||||
dependsOn: Linux_Build_Test_SonarCloud
|
dependsOn: Linux_Build_Test_SonarCloud
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: 'windows-2022'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
@@ -90,20 +90,20 @@ jobs:
|
|||||||
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 netcoreapp3.1'
|
arguments: '--configuration Debug --framework net6.0'
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'Execute Unit tests'
|
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 netcoreapp3.1 --collect:"XPlat Code Coverage" --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover'
|
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
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: 'windows-2022'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ trigger:
|
|||||||
- none
|
- none
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu 16.04'
|
vmImage: 'Ubuntu-latest'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
buildProjects: '**/src/**/*.csproj'
|
buildProjects: '**/src/**/*.csproj'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: 'windows-2022'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
Prerelease: ''
|
Prerelease: ''
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using RestEase;
|
using RestEase;
|
||||||
using System;
|
using System;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using WireMock.Admin.Settings;
|
||||||
using WireMock.Client;
|
using WireMock.Client;
|
||||||
|
|
||||||
namespace WireMock.Net.Client
|
namespace WireMock.Net.Client
|
||||||
@@ -22,7 +23,7 @@ namespace WireMock.Net.Client
|
|||||||
var settings1 = await api.GetSettingsAsync();
|
var settings1 = await api.GetSettingsAsync();
|
||||||
Console.WriteLine($"settings1 = {JsonConvert.SerializeObject(settings1)}");
|
Console.WriteLine($"settings1 = {JsonConvert.SerializeObject(settings1)}");
|
||||||
|
|
||||||
var settingsViaBuilder = new FluentBuilder.SettingsModelBuilder()
|
var settingsViaBuilder = new SettingsModelBuilder()
|
||||||
.WithGlobalProcessingDelay(1077)
|
.WithGlobalProcessingDelay(1077)
|
||||||
.WithoutGlobalProcessingDelay()
|
.WithoutGlobalProcessingDelay()
|
||||||
.Build();
|
.Build();
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -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.13" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -4,20 +4,10 @@
|
|||||||
"Matchers": [
|
"Matchers": [
|
||||||
{
|
{
|
||||||
"Name": "WildcardMatcher",
|
"Name": "WildcardMatcher",
|
||||||
"Patterns": [ "/static/mapping", "/static/mapping2" ]
|
"Pattern": "/static/mapping",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Body": {
|
|
||||||
"Matcher": {
|
|
||||||
"Name": "JsonMatcher",
|
|
||||||
"Pattern": {
|
|
||||||
"post1": "value 1",
|
|
||||||
"post2": "value 2"
|
|
||||||
},
|
|
||||||
"IgnoreCase": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Methods": [
|
"Methods": [
|
||||||
"get",
|
"get",
|
||||||
"post"
|
"post"
|
||||||
|
|||||||
20
examples/WireMock.Net.Console.NET5/log4net.config
Normal file
20
examples/WireMock.Net.Console.NET5/log4net.config
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
|
||||||
|
</configSections>
|
||||||
|
<appSettings>
|
||||||
|
<add key="log4net.Internal.Debug" value="true"/>
|
||||||
|
</appSettings>
|
||||||
|
<log4net>
|
||||||
|
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
|
||||||
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<conversionPattern value="%date [%thread] %-5level %logger{1} - %message%newline" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
<root>
|
||||||
|
<level value="DEBUG" />
|
||||||
|
<appender-ref ref="ConsoleAppender" />
|
||||||
|
</root>
|
||||||
|
</log4net>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\WireMock.Net.Console.Net452.Classic\MainApp.cs" Link="MainApp.cs" />
|
||||||
|
<Compile Include="..\WireMock.Net.Console.Net452.Classic\CustomFileSystemFileHandler.cs" Link="CustomFileSystemFileHandler.cs" />
|
||||||
|
<Compile Include="..\WireMock.Net.Console.NETCoreApp\Program.cs" Link="Program.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="__admin\mappings\*.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="__admin\mappings\1.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="__admin\mappings\array.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.*" />
|
||||||
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="log4net.config">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="nlog.config">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="__admin\mappings\791a3f31-6946-4ce7-8e6f-0237c7443275.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="__admin\mappings\791a3f31-6946-4ce7-8e6f-0237c7443275.json">
|
||||||
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="__admin\mappings\MyXmlResponse.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
1
examples/WireMock.Net.Console.NET6/__admin/mappings/1.cs
Normal file
1
examples/WireMock.Net.Console.NET6/__admin/mappings/1.cs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
// C# Hello
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Request": {
|
||||||
|
"Path": {
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "/static/mapping",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Methods": [
|
||||||
|
"get",
|
||||||
|
"post"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"BodyAsJson": { "body": "static mapping" },
|
||||||
|
"Headers": {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Test-X": [ "test 1", "test 2" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"Guid": "791a3f31-6946-4ce7-8e6f-0237c7443275",
|
||||||
|
"Title": "",
|
||||||
|
"Priority": 0,
|
||||||
|
"Request": {
|
||||||
|
"Path": "/proxy-google-test-post",
|
||||||
|
"Methods": [
|
||||||
|
"post"
|
||||||
|
],
|
||||||
|
"Body": {}
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"StatusCode": 404,
|
||||||
|
"Body": "<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">\n <title>Error 404 (Not Found)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n </style>\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n <p><b>404.</b> <ins>That’s an error.</ins>\n <p>The requested URL <code>/proxy-google-test-post</code> was not found on this server. <ins>That’s all we know.</ins>\n",
|
||||||
|
"BodyAsBytes": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CiAgPG1ldGEgY2hhcnNldD11dGYtOD4KICA8bWV0YSBuYW1lPXZpZXdwb3J0IGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MSwgbWluaW11bS1zY2FsZT0xLCB3aWR0aD1kZXZpY2Utd2lkdGgiPgogIDx0aXRsZT5FcnJvciA0MDQgKE5vdCBGb3VuZCkhITE8L3RpdGxlPgogIDxzdHlsZT4KICAgICp7bWFyZ2luOjA7cGFkZGluZzowfWh0bWwsY29kZXtmb250OjE1cHgvMjJweCBhcmlhbCxzYW5zLXNlcmlmfWh0bWx7YmFja2dyb3VuZDojZmZmO2NvbG9yOiMyMjI7cGFkZGluZzoxNXB4fWJvZHl7bWFyZ2luOjclIGF1dG8gMDttYXgtd2lkdGg6MzkwcHg7bWluLWhlaWdodDoxODBweDtwYWRkaW5nOjMwcHggMCAxNXB4fSogPiBib2R5e2JhY2tncm91bmQ6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2Vycm9ycy9yb2JvdC5wbmcpIDEwMCUgNXB4IG5vLXJlcGVhdDtwYWRkaW5nLXJpZ2h0OjIwNXB4fXB7bWFyZ2luOjExcHggMCAyMnB4O292ZXJmbG93OmhpZGRlbn1pbnN7Y29sb3I6Izc3Nzt0ZXh0LWRlY29yYXRpb246bm9uZX1hIGltZ3tib3JkZXI6MH1AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOjc3MnB4KXtib2R5e2JhY2tncm91bmQ6bm9uZTttYXJnaW4tdG9wOjA7bWF4LXdpZHRoOm5vbmU7cGFkZGluZy1yaWdodDowfX0jbG9nb3tiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9icmFuZGluZy9nb29nbGVsb2dvLzF4L2dvb2dsZWxvZ29fY29sb3JfMTUweDU0ZHAucG5nKSBuby1yZXBlYXQ7bWFyZ2luLWxlZnQ6LTVweH1AbWVkaWEgb25seSBzY3JlZW4gYW5kIChtaW4tcmVzb2x1dGlvbjoxOTJkcGkpeyNsb2dve2JhY2tncm91bmQ6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2JyYW5kaW5nL2dvb2dsZWxvZ28vMngvZ29vZ2xlbG9nb19jb2xvcl8xNTB4NTRkcC5wbmcpIG5vLXJlcGVhdCAwJSAwJS8xMDAlIDEwMCU7LW1vei1ib3JkZXItaW1hZ2U6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2JyYW5kaW5nL2dvb2dsZWxvZ28vMngvZ29vZ2xlbG9nb19jb2xvcl8xNTB4NTRkcC5wbmcpIDB9fUBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKC13ZWJraXQtbWluLWRldmljZS1waXhlbC1yYXRpbzoyKXsjbG9nb3tiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9icmFuZGluZy9nb29nbGVsb2dvLzJ4L2dvb2dsZWxvZ29fY29sb3JfMTUweDU0ZHAucG5nKSBuby1yZXBlYXQ7LXdlYmtpdC1iYWNrZ3JvdW5kLXNpemU6MTAwJSAxMDAlfX0jbG9nb3tkaXNwbGF5OmlubGluZS1ibG9jaztoZWlnaHQ6NTRweDt3aWR0aDoxNTBweH0KICA8L3N0eWxlPgogIDxhIGhyZWY9Ly93d3cuZ29vZ2xlLmNvbS8+PHNwYW4gaWQ9bG9nbyBhcmlhLWxhYmVsPUdvb2dsZT48L3NwYW4+PC9hPgogIDxwPjxiPjQwNC48L2I+IDxpbnM+VGhhdOKAmXMgYW4gZXJyb3IuPC9pbnM+CiAgPHA+VGhlIHJlcXVlc3RlZCBVUkwgPGNvZGU+L3Byb3h5LWdvb2dsZS10ZXN0LXBvc3Q8L2NvZGU+IHdhcyBub3QgZm91bmQgb24gdGhpcyBzZXJ2ZXIuICA8aW5zPlRoYXTigJlzIGFsbCB3ZSBrbm93LjwvaW5zPgo=",
|
||||||
|
"BodyEncoding": {
|
||||||
|
"CodePage": 65001,
|
||||||
|
"EncodingName": "Unicode (UTF-8)",
|
||||||
|
"WebName": "utf-8"
|
||||||
|
},
|
||||||
|
"UseTransformer": false,
|
||||||
|
"Headers": {
|
||||||
|
"Date": "Wed, 27 Oct 2017 18:57:40 GMT",
|
||||||
|
"Alt-Svc": "quic=\":443\"; ma=2592000; v=\"39,38,37,35\"",
|
||||||
|
"Referrer-Policy": "no-referrer",
|
||||||
|
"Connection": "close"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"Guid": "873d495f-940e-4b86-a1f4-4f0fc7be8b8b",
|
||||||
|
"Priority": 4,
|
||||||
|
"Request": {
|
||||||
|
"Path": {},
|
||||||
|
"Methods": [
|
||||||
|
"get"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"StatusCode": 200,
|
||||||
|
"BodyDestination": "SameAsSource",
|
||||||
|
"Body": "NO PATH OR URL",
|
||||||
|
"UseTransformer": false,
|
||||||
|
"Headers": {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Guid": "1234567A-940e-4b86-a1f4-4f0fc7be8b8b",
|
||||||
|
"Request": {
|
||||||
|
"Path": {
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "/bodyasfilexmltest",
|
||||||
|
"IgnoreCase": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Methods": [
|
||||||
|
"get"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"StatusCode": 200,
|
||||||
|
"Headers": { "Content-Type": "application/xml" },
|
||||||
|
"BodyAsFile": "MyXmlResponse.xml",
|
||||||
|
"UseTransformer": false
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<xml>
|
||||||
|
<hello>world</hello>
|
||||||
|
</xml>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Title": "1",
|
||||||
|
"Request": {
|
||||||
|
"Path": {
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "/mappings_static_1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Methods": [
|
||||||
|
"get"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"BodyAsJson": { "result": "mappings static_1" },
|
||||||
|
"Headers": {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Title": "2",
|
||||||
|
"Request": {
|
||||||
|
"Path": {
|
||||||
|
"Matchers": [
|
||||||
|
{
|
||||||
|
"Name": "WildcardMatcher",
|
||||||
|
"Pattern": "/mappings_static_2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Methods": [
|
||||||
|
"get"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"BodyAsJson": { "result": "mappings static_2" },
|
||||||
|
"Headers": {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
20
examples/WireMock.Net.Console.NET6/log4net.config
Normal file
20
examples/WireMock.Net.Console.NET6/log4net.config
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
|
||||||
|
</configSections>
|
||||||
|
<appSettings>
|
||||||
|
<add key="log4net.Internal.Debug" value="true"/>
|
||||||
|
</appSettings>
|
||||||
|
<log4net>
|
||||||
|
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
|
||||||
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<conversionPattern value="%date [%thread] %-5level %logger{1} - %message%newline" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
<root>
|
||||||
|
<level value="DEBUG" />
|
||||||
|
<appender-ref ref="ConsoleAppender" />
|
||||||
|
</root>
|
||||||
|
</log4net>
|
||||||
|
</configuration>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.13" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.*" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.*" />
|
||||||
<PackageReference Include="log4net" Version="2.0.13" />
|
<PackageReference Include="log4net" Version="2.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Response": {
|
"Response": {
|
||||||
"BodyAsJson": { "body": "static mapping" },
|
"BodyAsJson": { "body": "static mapping1" },
|
||||||
"Headers": {
|
"Headers": {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Test-X": [ "test 1", "test 2" ]
|
"Test-X": [ "test 1", "test 2" ]
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<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.1.1.0" newVersion="2.1.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.3.3.0" newVersion="2.3.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -459,6 +459,15 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.WithBody("linq match !!!")
|
.WithBody("linq match !!!")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
server
|
||||||
|
.Given(Request.Create().WithPath("/linq2")
|
||||||
|
.WithBody(new LinqMatcher("it.applicationId != null"))
|
||||||
|
.UsingPost()
|
||||||
|
)
|
||||||
|
.RespondWith(Response.Create()
|
||||||
|
.WithBody("linq2 match !!!")
|
||||||
|
);
|
||||||
|
|
||||||
server
|
server
|
||||||
.Given(Request.Create().WithPath("/myendpoint").UsingAnyMethod())
|
.Given(Request.Create().WithPath("/myendpoint").UsingAnyMethod())
|
||||||
.RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
|
|||||||
@@ -36,20 +36,20 @@
|
|||||||
<ApplicationIcon>..\..\resources\WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>..\..\resources\WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="AnyOf, Version=0.2.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\AnyOf.0.2.0\lib\net45\AnyOf.dll</HintPath>
|
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars, Version=2.0.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.0.4\lib\net452\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.0\lib\net452\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.2.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.1.1-preview-01\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.2\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.1.1-preview-01\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.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">
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.XML" />
|
<Reference Include="System.XML" />
|
||||||
@@ -80,6 +80,7 @@
|
|||||||
<None Include="App.config">
|
<None Include="App.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="libman.json" />
|
||||||
<None Include="log4net.config">
|
<None Include="log4net.config">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.2.0" targetFramework="net452" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net" version="2.0.4" targetFramework="net452" />
|
<package id="Handlebars.Net" version="2.1.0" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.1.1-preview-01" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers" version="2.3.2" targetFramework="net452" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.1.1-preview-01" targetFramework="net452" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.3" targetFramework="net452" />
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net452" />
|
<package id="log4net" version="2.0.14" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net452" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
||||||
<package id="System.ValueTuple" version="4.3.0" targetFramework="net452" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,6 +1,18 @@
|
|||||||
<?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.6.1" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
</startup>
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.3.3.0" newVersion="2.3.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -35,17 +35,17 @@
|
|||||||
<StartupObject>WireMock.Net.ConsoleApplication.Program</StartupObject>
|
<StartupObject>WireMock.Net.ConsoleApplication.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="AnyOf, Version=0.2.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\AnyOf.0.2.0\lib\net45\AnyOf.dll</HintPath>
|
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars, Version=2.0.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.0.4\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.0\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.1.1-preview-01\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.1\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.1.1-preview-01\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
<HintPath>..\..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\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.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.2.0" targetFramework="net461" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net" version="2.0.4" targetFramework="net461" />
|
<package id="Handlebars.Net" version="2.1.0" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.1.1-preview-01" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers" version="2.3.1" targetFramework="net461" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.1.1-preview-01" targetFramework="net461" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.3" targetFramework="net461" />
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net461" />
|
<package id="log4net" version="2.0.13" targetFramework="net461" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="System.ValueTuple" version="4.3.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -49,6 +49,14 @@
|
|||||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Handlebars" publicKeyToken="22225d0bf33cd661" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="HandlebarsDotNet.Helpers.Core" publicKeyToken="00d131fae0c250bc" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.3.3.0" newVersion="2.3.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -39,20 +39,20 @@
|
|||||||
<StartupObject>WireMock.Net.ConsoleApplication.Program</StartupObject>
|
<StartupObject>WireMock.Net.ConsoleApplication.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="AnyOf, Version=0.2.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
<Reference Include="AnyOf, Version=0.3.0.0, Culture=neutral, PublicKeyToken=b35e6abbb527c6b1, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\AnyOf.0.2.0\lib\net45\AnyOf.dll</HintPath>
|
<HintPath>..\..\packages\AnyOf.0.3.0\lib\net45\AnyOf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Fare, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ea68d375bf33a7c8, processorArchitecture=MSIL">
|
<Reference Include="Fare, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ea68d375bf33a7c8, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Fare.2.1.1\lib\net35\Fare.dll</HintPath>
|
<HintPath>..\..\packages\Fare.2.1.2\lib\net35\Fare.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars, Version=2.0.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
<Reference Include="Handlebars, Version=2.1.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.2.0.4\lib\net46\Handlebars.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.2.1.0\lib\net46\Handlebars.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Handlebars.Net.Helpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="Handlebars.Net.Helpers, Version=2.3.2.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.1.1-preview-01\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.2.3.2\lib\net452\Handlebars.Net.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
<Reference Include="HandlebarsDotNet.Helpers.Core, Version=2.3.3.0, Culture=neutral, PublicKeyToken=00d131fae0c250bc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.1.1-preview-01\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
<HintPath>..\..\packages\Handlebars.Net.Helpers.Core.2.3.3\lib\net452\HandlebarsDotNet.Helpers.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="JmesPath.Net, Version=1.0.125.0, Culture=neutral, PublicKeyToken=b29d616b7f4faff0, processorArchitecture=MSIL">
|
<Reference Include="JmesPath.Net, Version=1.0.125.0, Culture=neutral, PublicKeyToken=b29d616b7f4faff0, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\JmesPath.Net.1.0.125\lib\net45\JmesPath.Net.dll</HintPath>
|
<HintPath>..\..\packages\JmesPath.Net.1.0.125\lib\net45\JmesPath.Net.dll</HintPath>
|
||||||
@@ -241,8 +241,8 @@
|
|||||||
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IO.Pipelines.4.5.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.0.12.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.16.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.0.12\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.16\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>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AnyOf" version="0.2.0" targetFramework="net472" />
|
<package id="AnyOf" version="0.3.0" targetFramework="net472" />
|
||||||
<package id="Fare" version="2.1.1" targetFramework="net472" />
|
<package id="Fare" version="2.1.2" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net" version="2.0.4" targetFramework="net472" />
|
<package id="Handlebars.Net" version="2.1.0" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers" version="2.1.1-preview-01" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers" version="2.3.2" targetFramework="net472" />
|
||||||
<package id="Handlebars.Net.Helpers.Core" version="2.1.1-preview-01" targetFramework="net472" />
|
<package id="Handlebars.Net.Helpers.Core" version="2.3.3" targetFramework="net472" />
|
||||||
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
<package id="JmesPath.Net" version="1.0.125" targetFramework="net472" />
|
||||||
<package id="log4net" version="2.0.13" targetFramework="net472" />
|
<package id="log4net" version="2.0.13" targetFramework="net472" />
|
||||||
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net472" />
|
<package id="Microsoft.AspNetCore" version="2.2.0" targetFramework="net472" />
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<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.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.0.12" targetFramework="net472" />
|
<package id="System.Linq.Dynamic.Core" version="1.2.16" 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" />
|
||||||
|
|||||||
@@ -35,21 +35,21 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
|||||||
|
|
||||||
_server = WireMockServer.Start(settings);
|
_server = WireMockServer.Start(settings);
|
||||||
|
|
||||||
_server.Given(Request.Create().WithPath("/api/sap")
|
//_server.Given(Request.Create().WithPath("/api/sap")
|
||||||
.UsingPost()
|
// .UsingPost()
|
||||||
.WithBody((IBodyData xmlData) =>
|
// .WithBody((IBodyData xmlData) =>
|
||||||
{
|
// {
|
||||||
//xmlData is always null
|
// //xmlData is always null
|
||||||
return true;
|
// return true;
|
||||||
}))
|
// }))
|
||||||
.RespondWith(Response.Create().WithStatusCode(System.Net.HttpStatusCode.OK));
|
// .RespondWith(Response.Create().WithStatusCode(System.Net.HttpStatusCode.OK));
|
||||||
|
|
||||||
_server
|
//_server
|
||||||
.Given(Request.Create()
|
// .Given(Request.Create()
|
||||||
.UsingAnyMethod())
|
// .UsingAnyMethod())
|
||||||
.RespondWith(Response.Create()
|
// .RespondWith(Response.Create()
|
||||||
.WithTransformer()
|
// .WithTransformer()
|
||||||
.WithBody("{{Random Type=\"Integer\" Min=100 Max=999999}} {{DateTime.Now}} {{DateTime.Now \"yyyy-MMM\"}} {{String.Format (DateTime.Now) \"MMM-dd\"}}"));
|
// .WithBody("{{Random Type=\"Integer\" Min=100 Max=999999}} {{DateTime.Now}} {{DateTime.Now \"yyyy-MMM\"}} {{String.Format (DateTime.Now) \"MMM-dd\"}}"));
|
||||||
|
|
||||||
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
||||||
|
|
||||||
|
|||||||
@@ -225,8 +225,8 @@
|
|||||||
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.IO.Pipelines.4.5.2\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
<HintPath>..\..\packages\System.IO.Pipelines.4.5.2\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Linq.Dynamic.Core, Version=1.0.12.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
<Reference Include="System.Linq.Dynamic.Core, Version=1.2.16.0, Culture=neutral, PublicKeyToken=0f07ec44de6ac832, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.0.12\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
<HintPath>..\..\packages\System.Linq.Dynamic.Core.1.2.16\lib\net46\System.Linq.Dynamic.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.IO.Pipelines" version="4.5.2" targetFramework="net461" />
|
<package id="System.IO.Pipelines" version="4.5.2" targetFramework="net461" />
|
||||||
<package id="System.Linq.Dynamic.Core" version="1.0.12" targetFramework="net461" />
|
<package id="System.Linq.Dynamic.Core" version="1.2.16" targetFramework="net461" />
|
||||||
<package id="System.Memory" version="4.5.1" targetFramework="net461" />
|
<package id="System.Memory" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
||||||
|
|||||||
@@ -32,10 +32,10 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
|
|
||||||
<!-- See also https://mstack.nl/blog/20210801-source-generators -->
|
<!-- See also https://mstack.nl/blog/20210801-source-generators -->
|
||||||
<PackageReference Include="FluentBuilder" Version="0.0.11">
|
<PackageReference Include="FluentBuilder" Version="0.4.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>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' != 'net451' and '$(TargetFramework)' != 'netstandard1.3'">
|
<ItemGroup Condition="'$(TargetFramework)' != 'net451' and '$(TargetFramework)' != 'netstandard1.3'">
|
||||||
<PackageReference Include="FluentAssertions" Version="6.1.0" />
|
<PackageReference Include="FluentAssertions" Version="6.5.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace WireMock.Matchers
|
|||||||
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)
|
#elif (NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP3_1 || NET5_0 || NET6_0)
|
||||||
Assembly assembly;
|
Assembly assembly;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -169,11 +169,11 @@ namespace WireMock.Matchers
|
|||||||
dynamic script;
|
dynamic script;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if NETSTANDARD2_0
|
//#if NETSTANDARD2_0
|
||||||
script = csscript.GenericExtensions.CreateObject(assembly, "*");
|
// script = csscript.GenericExtensions.CreateObject(assembly, "*");
|
||||||
#else
|
//#else
|
||||||
script = CSScriptLib.ReflectionExtensions.CreateObject(assembly, "*");
|
script = CSScripting.ReflectionExtensions.CreateObject(assembly, "*");
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<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</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>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
|
|
||||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -45,16 +45,8 @@
|
|||||||
<PackageReference Include="CS-Script" Version="3.30.3" />
|
<PackageReference Include="CS-Script" Version="3.30.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.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.Core" Version="1.1.1" />
|
<PackageReference Include="CS-Script" Version="4.4.1" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
|
|
||||||
<PackageReference Include="CS-Script.Core" Version="1.4.2-preview" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0'">
|
|
||||||
<PackageReference Include="CS-Script.Core" Version="1.4.2-preview" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>An OpenApi (swagger) parser to generate MappingModel or mapping.json file.</Description>
|
<Description>An OpenApi (swagger) parser to generate MappingModel or mapping.json file.</Description>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.2.3" />
|
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.2.3" />
|
||||||
<PackageReference Include="RamlToOpenApiConverter" Version="0.6.0" />
|
<PackageReference Include="RamlToOpenApiConverter" Version="0.6.1" />
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.13" />
|
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.13" />
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="RestEase" Version="1.5.5" />
|
<PackageReference Include="RestEase" Version="1.5.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<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</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>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using WireMock.HttpsCertificate;
|
using WireMock.HttpsCertificate;
|
||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
@@ -9,7 +9,7 @@ namespace WireMock.Http
|
|||||||
{
|
{
|
||||||
public static HttpClient Build(IHttpClientSettings settings)
|
public static HttpClient Build(IHttpClientSettings settings)
|
||||||
{
|
{
|
||||||
#if NETSTANDARD || NETCOREAPP3_1 || NET5_0
|
#if NETSTANDARD || NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
var handler = new HttpClientHandler
|
var handler = new HttpClientHandler
|
||||||
{
|
{
|
||||||
CheckCertificateRevocationList = false,
|
CheckCertificateRevocationList = false,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if NETCOREAPP3_1_OR_GREATER
|
#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;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace WireMock.Owin
|
|||||||
services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>();
|
services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>();
|
||||||
services.AddSingleton<IOwinResponseMapper, OwinResponseMapper>();
|
services.AddSingleton<IOwinResponseMapper, OwinResponseMapper>();
|
||||||
|
|
||||||
#if NETCOREAPP3_1_OR_GREATER
|
#if NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
AddCors(services);
|
AddCors(services);
|
||||||
#endif
|
#endif
|
||||||
_wireMockMiddlewareOptions.AdditionalServiceRegistration?.Invoke(services);
|
_wireMockMiddlewareOptions.AdditionalServiceRegistration?.Invoke(services);
|
||||||
@@ -79,7 +79,7 @@ namespace WireMock.Owin
|
|||||||
{
|
{
|
||||||
appBuilder.UseMiddleware<GlobalExceptionMiddleware>();
|
appBuilder.UseMiddleware<GlobalExceptionMiddleware>();
|
||||||
|
|
||||||
#if NETCOREAPP3_1_OR_GREATER
|
#if NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
UseCors(appBuilder);
|
UseCors(appBuilder);
|
||||||
#endif
|
#endif
|
||||||
_wireMockMiddlewareOptions.PreWireMockMiddlewareInit?.Invoke(appBuilder);
|
_wireMockMiddlewareOptions.PreWireMockMiddlewareInit?.Invoke(appBuilder);
|
||||||
@@ -136,6 +136,8 @@ namespace WireMock.Owin
|
|||||||
_logger.Info("Server using .NET Core 3.1");
|
_logger.Info("Server using .NET Core 3.1");
|
||||||
#elif NET5_0
|
#elif NET5_0
|
||||||
_logger.Info("Server using .NET 5.0");
|
_logger.Info("Server using .NET 5.0");
|
||||||
|
#elif NET6_0
|
||||||
|
_logger.Info("Server using .NET 6.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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace WireMock.Server
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class WireMockServer
|
public partial class WireMockServer
|
||||||
{
|
{
|
||||||
private const int EnhancedFileSystemWatcherTimeoutMs = 1000;
|
private const int EnhancedFileSystemWatcherTimeoutMs = 10000; // Changed from 1000 to 10000 (#726)
|
||||||
private const int AdminPriority = int.MinValue;
|
private const int AdminPriority = int.MinValue;
|
||||||
private const int ProxyPriority = 1000;
|
private const int ProxyPriority = 1000;
|
||||||
private const string ContentTypeJson = "application/json";
|
private const string ContentTypeJson = "application/json";
|
||||||
|
|||||||
@@ -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</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>
|
||||||
@@ -42,7 +42,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'">
|
<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>
|
||||||
|
|
||||||
@@ -50,16 +50,20 @@
|
|||||||
<DefineConstants>USE_ASPNETCORE;NET46</DefineConstants>
|
<DefineConstants>USE_ASPNETCORE;NET46</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Util\FileSystemWatcherExtensions.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
||||||
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
<PackageReference Include="Stef.Validation" Version="0.1.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.12" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.17" />
|
||||||
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.13" />
|
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.13" />
|
||||||
<PackageReference Include="JmesPath.Net" Version="1.0.125" />
|
<PackageReference Include="JmesPath.Net" Version="1.0.125" />
|
||||||
<PackageReference Include="AnyOf" Version="0.2.0" />
|
<PackageReference Include="AnyOf" Version="0.3.0" />
|
||||||
<!--<PackageReference Include="TinyMapper" Version="3.0.3" />-->
|
<!--<PackageReference Include="TinyMapper" Version="3.0.3" />-->
|
||||||
<!--<PackageReference Include="Mapster" Version="7.2.0" />-->
|
<!--<PackageReference Include="Mapster" Version="7.2.0" />-->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -72,7 +76,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard1.3' ">
|
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard1.3' ">
|
||||||
<PackageReference Include="XPath2.Extensions" Version="1.1.0" />
|
<PackageReference Include="XPath2.Extensions" Version="1.1.2" />
|
||||||
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.12.2" />
|
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.12.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -100,6 +104,9 @@
|
|||||||
<PackageReference Include="Scriban.Signed" Version="2.1.4" />
|
<PackageReference Include="Scriban.Signed" Version="2.1.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
||||||
|
|
||||||
|
<!-- https://github.com/WireMock-Net/WireMock.Net/issues/697 -->
|
||||||
|
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" />
|
||||||
|
|
||||||
<!-- https://github.com/WireMock-Net/WireMock.Net/issues/507 -->
|
<!-- https://github.com/WireMock-Net/WireMock.Net/issues/507 -->
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="2.2.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="2.2.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -121,19 +128,19 @@
|
|||||||
<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'">
|
<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="3.3.2" />
|
<PackageReference Include="Scriban.Signed" Version="3.3.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers" Version="2.3.3" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.3.3" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Humanizer" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers.Humanizer" Version="2.3.3" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.3.3" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.3.3" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers.XPath" Version="2.3.3" />
|
||||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.2.1" />
|
<PackageReference Include="Handlebars.Net.Helpers.Xeger" Version="2.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Commonly used interfaces, models, enumerations and types.</Description>
|
<Description>Commonly used interfaces, models, enumerations and types.</Description>
|
||||||
<AssemblyTitle>WireMock.Org.Abstractions</AssemblyTitle>
|
<AssemblyTitle>WireMock.Org.Abstractions</AssemblyTitle>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net45;netstandard1.0;netstandard2.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>net45;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.Org.Abstractions</AssemblyName>
|
<AssemblyName>WireMock.Org.Abstractions</AssemblyName>
|
||||||
<PackageId>WireMock.Org.Abstractions</PackageId>
|
<PackageId>WireMock.Org.Abstractions</PackageId>
|
||||||
<PackageTags>wiremock;wiremock.org;interfaces;models;classes;enumerations;types</PackageTags>
|
<PackageTags>wiremock;wiremock.org;interfaces;models;classes;enumerations;types</PackageTags>
|
||||||
@@ -35,7 +33,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!--<PackageReference Include="AnyOf" Version="0.1.0" />-->
|
<!--<PackageReference Include="AnyOf" Version="0.1.0" />-->
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<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="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||||
<PackageReference Include="System.Text.Json" Version="5.0.0" />
|
<PackageReference Include="System.Text.Json" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Linq.Dynamic.Core;
|
||||||
|
using FluentAssertions;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NFluent;
|
using NFluent;
|
||||||
using System.Linq.Dynamic.Core;
|
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
@@ -41,7 +42,28 @@ namespace WireMock.Net.Tests.Util
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void JsonUtils_GenerateDynamicLinqStatement_JObject()
|
public void JsonUtils_GenerateDynamicLinqStatement_JArray_Indexer()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var j = new JObject
|
||||||
|
{
|
||||||
|
{ "Items", new JArray(new[] { new JValue(4), new JValue(8) }) }
|
||||||
|
};
|
||||||
|
|
||||||
|
// Act
|
||||||
|
string line = JsonUtils.GenerateDynamicLinqStatement(j);
|
||||||
|
|
||||||
|
// Assert 1
|
||||||
|
line.Should().Be("new ((new [] { long(Items[0]), long(Items[1])}) as Items)");
|
||||||
|
|
||||||
|
// Assert 2
|
||||||
|
var queryable = new[] { j }.AsQueryable().Select(line);
|
||||||
|
bool result = queryable.Any("Items != null");
|
||||||
|
result.Should().BeTrue();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonUtils_GenerateDynamicLinqStatement_JObject2()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
var j = new JObject
|
var j = new JObject
|
||||||
@@ -52,7 +74,6 @@ namespace WireMock.Net.Tests.Util
|
|||||||
{"Flt", new JValue(10.0f)},
|
{"Flt", new JValue(10.0f)},
|
||||||
{"Dbl", new JValue(Math.PI)},
|
{"Dbl", new JValue(Math.PI)},
|
||||||
{"Check", new JValue(true)},
|
{"Check", new JValue(true)},
|
||||||
{"Items", new JArray(new[] { new JValue(4), new JValue(8) })},
|
|
||||||
{
|
{
|
||||||
"Child", new JObject
|
"Child", new JObject
|
||||||
{
|
{
|
||||||
@@ -69,12 +90,13 @@ namespace WireMock.Net.Tests.Util
|
|||||||
// Act
|
// Act
|
||||||
string line = JsonUtils.GenerateDynamicLinqStatement(j);
|
string line = JsonUtils.GenerateDynamicLinqStatement(j);
|
||||||
|
|
||||||
// Assert
|
// Assert 1
|
||||||
|
line.Should().Be("new (Uri(U) as U, null as N, Guid(G) as G, double(Flt) as Flt, double(Dbl) as Dbl, bool(Check) as Check, new (long(Child.ChildId) as ChildId, DateTime(Child.ChildDateTime) as ChildDateTime, TimeSpan(Child.TS) as TS) as Child, long(I) as I, long(L) as L, string(Name) as Name)");
|
||||||
|
|
||||||
|
// Assert 2
|
||||||
var queryable = new[] { j }.AsQueryable().Select(line);
|
var queryable = new[] { j }.AsQueryable().Select(line);
|
||||||
bool result = queryable.Any("I > 1 && L > 1");
|
bool result = queryable.Any("I > 1 && L > 1");
|
||||||
Check.That(result).IsTrue();
|
result.Should().BeTrue();
|
||||||
|
|
||||||
Check.That(line).IsEqualTo("new (Uri(U) as U, null as N, Guid(G) as G, double(Flt) as Flt, double(Dbl) as Dbl, bool(Check) as Check, (new [] { long(Items[0]), long(Items[1])}) as Items, new (long(Child.ChildId) as ChildId, DateTime(Child.ChildDateTime) as ChildDateTime, TimeSpan(Child.TS) as TS) as Child, long(I) as I, long(L) as L, string(Name) as Name)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net452;net461;netcoreapp3.1;net5.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>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Codecov" Version="1.13.0" />
|
<PackageReference Include="Codecov" Version="1.13.0" />
|
||||||
<PackageReference Include="coverlet.msbuild" Version="3.1.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>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<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.1.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>
|
||||||
@@ -59,9 +59,9 @@
|
|||||||
<!--<PackageReference Include="OpenCover" Version="4.7.922" />-->
|
<!--<PackageReference Include="OpenCover" Version="4.7.922" />-->
|
||||||
<!--<PackageReference Include="ReportGenerator" Version="4.8.1" />-->
|
<!--<PackageReference Include="ReportGenerator" Version="4.8.1" />-->
|
||||||
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.12" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.17" />
|
||||||
<!--<PackageReference Include="StrongNamer" Version="0.2.5" />-->
|
<!--<PackageReference Include="StrongNamer" Version="0.2.5" />-->
|
||||||
<PackageReference Include="AnyOf" Version="0.2.0" />
|
<PackageReference Include="AnyOf" Version="0.3.0" />
|
||||||
<!--<PackageReference Include="TinyMapper" Version="3.0.3" />-->
|
<!--<PackageReference Include="TinyMapper" Version="3.0.3" />-->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' != 'net452' and '$(TargetFramework)' != 'net461'">
|
<ItemGroup Condition="'$(TargetFramework)' != 'net452' and '$(TargetFramework)' != 'net461'">
|
||||||
<PackageReference Include="FluentAssertions" Version="6.1.0" />
|
<PackageReference Include="FluentAssertions" Version="6.5.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
|
<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ namespace WireMock.Net.Tests
|
|||||||
server.Stop();
|
server.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETCOREAPP3_1_OR_GREATER
|
#if NETCOREAPP3_1 || NET5_0 || NET6_0
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task WireMockServer_WithCorsPolicyOptions_Should_Work_Correct()
|
public async Task WireMockServer_WithCorsPolicyOptions_Should_Work_Correct()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user