Fixed Multi Param Match logic (#256)

* fix?

* 1.0.9

* <PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.11" />

* fix tests ?

* fix

* RequestMessageParamMatcher
This commit is contained in:
Stef Heyenrath
2019-03-25 18:00:22 +01:00
committed by GitHub
parent 658f74ac61
commit 9e123fbbea
18 changed files with 161 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
namespace WireMock.Matchers
@@ -54,6 +55,7 @@ namespace WireMock.Matchers
/// </summary>
/// <param name="values">The values.</param>
/// <returns>average score</returns>
[SuppressMessage("ReSharper", "PossibleMultipleEnumeration")]
public static double ToScore(IEnumerable<bool> values)
{
return values.Any() ? values.Select(ToScore).Average() : Mismatch;
@@ -64,6 +66,7 @@ namespace WireMock.Matchers
/// </summary>
/// <param name="values">The values.</param>
/// <returns>average score</returns>
[SuppressMessage("ReSharper", "PossibleMultipleEnumeration")]
public static double ToScore(IEnumerable<double> values)
{
return values.Any() ? values.Average() : Mismatch;