Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower priority from Proxy mappings in favor of Admin Mappings #204

Merged
merged 14 commits into from
Sep 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ steps:
- script: |
%USERPROFILE%\.dotnet\tools\dotnet-sonarscanner begin /k:"wiremock" /d:sonar.organization="stefh-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$(SONAR_TOKEN)" /v:"$(buildId)" /d:sonar.cs.opencover.reportsPaths="**\coverage.opencover.xml"

# Build source, tests and run tests
# Build source, tests and run tests for net452 and netcoreapp2.1 (with coverage)
- script: |
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework net452
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework netcoreapp2.1 --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

# End SonarScanner
Expand Down
11 changes: 11 additions & 0 deletions build-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Build info
For building and running all code in VSCode:

- download nuget.exe from https://www.nuget.org/downloads
- copy nuget.exe to a folder which is listed in the path or just in c:\Windows
- go to the root from this project and run `nuget restore`
- all packages are now restored into the `WireMock.Net\packages` folder

### Note
An example project like `WireMock.Net.Console.Net452.Classic` still shows some red errors in VSCode, but you can just run `dotnet build`.
But you can just execute `.\bin\Debug\WireMock.Net.ConsoleApplication.exe` to run the application
8 changes: 0 additions & 8 deletions examples/WireMock.Net.Console.Net452.Classic/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,4 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
13 changes: 13 additions & 0 deletions examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public static void Run()
.WithHeader("Keep-Alive", "timeout=1, max=1")
);

server
.Given(Request.Create()
.WithPath("/httpbin")
)
.RespondWith(Response.Create()
.WithProxy(new ProxyAndRecordSettings { Url = "http://httpbin.org" })
);

server
.Given(Request.Create()
.UsingGet()
Expand Down Expand Up @@ -140,6 +148,11 @@ public static void Run()
.WithHeader("Content-Type", "application/json")
.WithBodyAsJson(new { result = "data:headers posted with 201" }));

if (!System.IO.File.Exists(@"c:\temp\x.json"))
{
System.IO.File.WriteAllText(@"c:\temp\x.json", "{ \"hello\": \"world\", \"answer\": 42 }");
}

server
.Given(Request.Create().WithPath("/file").UsingGet())
.RespondWith(Response.Create()
Expand Down
Loading