mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-01 06:33:11 +02:00
Added support of custom matchers in static mappings (#713)
* Added support of custom matchers in static mappings * Fixed code style issues * Fixed naming and code style * added empty line * Ignore serialization of CustomMatcherMappings property in WireMockServerSettings * Added integration tests for CustomMatcherMappings
This commit is contained in:
@@ -105,6 +105,11 @@ namespace WireMock.Serialization
|
||||
return new SimMetricsMatcher(matchBehaviour, stringPatterns, type, throwExceptionWhenMatcherFails);
|
||||
|
||||
default:
|
||||
if (_settings.CustomMatcherMappings != null && _settings.CustomMatcherMappings.ContainsKey(matcherName))
|
||||
{
|
||||
return _settings.CustomMatcherMappings[matcherName](matcher);
|
||||
}
|
||||
|
||||
throw new NotSupportedException($"Matcher '{matcherName}' is not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user