mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-28 04:12:18 +01:00
Add MatchOperator "Or", "And" and "Average" for patterns (#755)
* wip * ... * . * ... * ... * path * url * b * t * client * . * RequestMessageMethodMatcherTests * . * h * . * fix tests * .
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
using WireMock.Matchers.Request;
|
||||
@@ -86,7 +86,7 @@ namespace WireMock.Net.Tests.RequestMatchers
|
||||
Check.That(score).IsEqualTo(1.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "does not work anymore since 'and'/'or'/'average'")]
|
||||
public void RequestMessageHeaderMatcher_GetMatchingScore_RejectOnMatch()
|
||||
{
|
||||
// Assign
|
||||
@@ -108,7 +108,7 @@ namespace WireMock.Net.Tests.RequestMatchers
|
||||
// Assign
|
||||
var headers = new Dictionary<string, string[]> { { "h", new[] { "x" } } };
|
||||
var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers);
|
||||
var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.AcceptOnMatch, "h", false, new ExactMatcher("x"));
|
||||
var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.AcceptOnMatch, MatchOperator.Or, "h", false, new ExactMatcher("x"));
|
||||
|
||||
// Act
|
||||
var result = new RequestMatchResult();
|
||||
|
||||
Reference in New Issue
Block a user