mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-14 06:17:11 +01:00
More fixes for #106
This commit is contained in:
@@ -51,5 +51,35 @@ namespace WireMock.Net.Tests.RequestMatchers
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(0.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestMessageParamMatcher_GetMatchingScore_OnlyKeyPresent_WithNull()
|
||||
{
|
||||
// Assign
|
||||
var requestMessage = new RequestMessage(new Uri("http://localhost?key"), "GET", "127.0.0.1");
|
||||
var matcher = new RequestMessageParamMatcher("key");
|
||||
|
||||
// Act
|
||||
var result = new RequestMatchResult();
|
||||
double score = matcher.GetMatchingScore(requestMessage, result);
|
||||
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(1.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestMessageParamMatcher_GetMatchingScore_OnlyKeyPresent_WithEmptyArray()
|
||||
{
|
||||
// Assign
|
||||
var requestMessage = new RequestMessage(new Uri("http://localhost?key"), "GET", "127.0.0.1");
|
||||
var matcher = new RequestMessageParamMatcher("key", new string[] { });
|
||||
|
||||
// Act
|
||||
var result = new RequestMatchResult();
|
||||
double score = matcher.GetMatchingScore(requestMessage, result);
|
||||
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(1.0d);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user