mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-27 20:01:52 +01:00
Update QueryStringParser to support param with equal but no value (#1253)
* RequestMessageParamMatcher * ? * . * .
This commit is contained in:
@@ -43,6 +43,21 @@ public class RequestMessageParamMatcherTests
|
||||
Check.That(score).IsEqualTo(0.5d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestMessageParamMatcher_GetMatchingScore_KeyWithNoValuePresentInUrl_Returns1_0()
|
||||
{
|
||||
// Assign
|
||||
var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key="), "GET", "127.0.0.1");
|
||||
var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key", false, "");
|
||||
|
||||
// Act
|
||||
var result = new RequestMatchResult();
|
||||
var score = matcher.GetMatchingScore(requestMessage, result);
|
||||
|
||||
// Assert
|
||||
Check.That(score).IsEqualTo(1.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestMessageParamMatcher_GetMatchingScore_KeyWith3ValuesPresentInUrl_And_With1ExactStringWith2Patterns_Returns0_66()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user