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

@@ -33,7 +33,33 @@ namespace WireMock.Net.Tests.Matchers
}
[Fact]
public void ExactMatcher_IsMatch_MultiplePatterns()
public void ExactMatcher_IsMatch_WithSinglePattern_ReturnsMatch1_0()
{
// Assign
var matcher = new ExactMatcher("x");
// Act
double result = matcher.IsMatch("x");
// Assert
Check.That(result).IsEqualTo(1.0);
}
[Fact]
public void ExactMatcher_IsMatch_WithSinglePattern_ReturnsMatch0_0()
{
// Assign
var matcher = new ExactMatcher("x");
// Act
double result = matcher.IsMatch("y");
// Assert
Check.That(result).IsEqualTo(0.0);
}
[Fact]
public void ExactMatcher_IsMatch_WithMultiplePatterns_ReturnsMatch0_5()
{
// Assign
var matcher = new ExactMatcher("x", "y");
@@ -42,7 +68,7 @@ namespace WireMock.Net.Tests.Matchers
double result = matcher.IsMatch("x");
// Assert
Check.That(result).IsEqualTo(0.5d);
Check.That(result).IsEqualTo(1.0);
}
[Fact]