This commit is contained in:
Stef Heyenrath
2026-01-12 18:26:06 +01:00
parent 83922fd543
commit 403fc01867
3 changed files with 2 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ public class MimePartMatcher : IMimePartMatcher
ContentTransferEncodingMatcher = contentTransferEncodingMatcher; ContentTransferEncodingMatcher = contentTransferEncodingMatcher;
ContentMatcher = contentMatcher; ContentMatcher = contentMatcher;
_matcherFunctions = new List<(string Name, Func<IMimePartData, MatchResult> func)>(); _matcherFunctions = [];
if (ContentTypeMatcher != null) if (ContentTypeMatcher != null)
{ {
_matcherFunctions.Add((nameof(ContentTypeMatcher), mp => ContentTypeMatcher.IsMatch(GetContentTypeAsString(mp.ContentType)))); _matcherFunctions.Add((nameof(ContentTypeMatcher), mp => ContentTypeMatcher.IsMatch(GetContentTypeAsString(mp.ContentType))));

View File

@@ -29,15 +29,13 @@ public class RequestMatchResult : IRequestMatchResult
/// <inheritdoc /> /// <inheritdoc />
public double AddScore(Type matcherType, double score, Exception? exception) public double AddScore(Type matcherType, double score, Exception? exception)
{ {
MatchDetails.Add(new MatchDetail return AddMatchDetail(new MatchDetail
{ {
Name = matcherType.Name.Replace("RequestMessage", string.Empty), Name = matcherType.Name.Replace("RequestMessage", string.Empty),
MatcherType = matcherType, MatcherType = matcherType,
Score = score, Score = score,
Exception = exception Exception = exception
}); });
return score;
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@@ -27,11 +27,6 @@ internal class MappingMatcher(IWireMockMiddlewareOptions options, IRandomizerDou
foreach (var mapping in mappings) foreach (var mapping in mappings)
{ {
if (mapping.Guid == new Guid("b9c82182-e469-41da-bcaf-b6e3157fefdb") || mapping.Guid == new Guid("b9c82182-e469-41da-bcaf-b6e3157fefdc"))
{
int x = 9;
}
try try
{ {
var nextState = GetNextState(mapping); var nextState = GetNextState(mapping);