AllowAnyHttpStatusCodeInResponse (#407)

* .

* ,

* PUBLISH_TESTRESULTS

* fix logging

* fix compile error

* codefactor fix

* Debug - Sonar + other things in csproj
This commit is contained in:
Stef Heyenrath
2020-01-27 18:47:58 +01:00
committed by GitHub
parent 6ae7fc1d75
commit 307a89d324
27 changed files with 249 additions and 54 deletions

View File

@@ -137,7 +137,25 @@ namespace WireMock.Net.Tests
Check.That(options.AllowBodyForAllHttpMethods).Equals(true);
// Verify
_loggerMock.Verify(l => l.Info(It.IsAny<string>(), It.IsAny<bool>()));
_loggerMock.Verify(l => l.Info(It.Is<string>(s => s.Contains("AllowBodyForAllHttpMethods") && s.Contains("True"))));
}
[Fact]
public void WireMockServer_WireMockServerSettings_AllowAnyHttpStatusCodeInResponse()
{
// Assign and Act
var server = WireMockServer.Start(new WireMockServerSettings
{
Logger = _loggerMock.Object,
AllowAnyHttpStatusCodeInResponse = true
});
// Assert
var options = server.GetPrivateFieldValue<IWireMockMiddlewareOptions>("_options");
Check.That(options.AllowAnyHttpStatusCodeInResponse).Equals(true);
// Verify
_loggerMock.Verify(l => l.Info(It.Is<string>(s => s.Contains("AllowAnyHttpStatusCodeInResponse") && s.Contains("True"))));
}
[Fact]