mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-18 14:39:45 +02:00
Fix Sonarqube issues
This commit is contained in:
@@ -833,9 +833,9 @@ namespace WireMock.Server
|
||||
|
||||
if (requestModel.Params != null)
|
||||
{
|
||||
foreach (var paramModel in requestModel.Params.Where(c => c.Matchers != null))
|
||||
foreach (var paramModel in requestModel.Params.Where(p => p != null && p.Matchers != null))
|
||||
{
|
||||
bool ignoreCase = paramModel?.IgnoreCase ?? false;
|
||||
bool ignoreCase = paramModel.IgnoreCase == true;
|
||||
requestBuilder = requestBuilder.WithParam(paramModel.Name, ignoreCase, paramModel.Matchers.Select(_matcherMapper.Map).OfType<IStringMatcher>().ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +184,17 @@ namespace WireMock.Server
|
||||
ReadStaticMappings = true
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WireMockServer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="settings">The settings.</param>
|
||||
/// <exception cref="WireMockException">
|
||||
/// Service start failed with error: {_httpServer.RunningException.Message}
|
||||
/// or
|
||||
/// Service start failed with error: {startTask.Exception.Message}
|
||||
/// </exception>
|
||||
/// <exception cref="TimeoutException">Service start timed out after {TimeSpan.FromMilliseconds(settings.StartTimeout)}</exception>
|
||||
protected WireMockServer(IWireMockServerSettings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
@@ -422,7 +433,7 @@ namespace WireMock.Server
|
||||
{
|
||||
_options.Scenarios.Clear();
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc cref="IWireMockServer.WithMapping(MappingModel[])" />
|
||||
[PublicAPI]
|
||||
public IWireMockServer WithMapping(params MappingModel[] mappings)
|
||||
|
||||
Reference in New Issue
Block a user