mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-23 17:41:01 +01:00
ExactMatcher : IgnoreCase (#817)
* ... * mm * fix some null warnings * fx
This commit is contained in:
@@ -408,4 +408,24 @@ public class MatcherMapperTests
|
||||
matcher.Value.Should().BeEquivalentTo(pattern);
|
||||
matcher.Regex.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MatcherMapper_Map_MatcherModel_ExactMatcher_Pattern()
|
||||
{
|
||||
// Assign
|
||||
var model = new MatcherModel
|
||||
{
|
||||
Name = "ExactMatcher",
|
||||
Pattern = "p",
|
||||
IgnoreCase = true
|
||||
};
|
||||
|
||||
// Act
|
||||
var matcher = (ExactMatcher)_sut.Map(model)!;
|
||||
|
||||
// Assert
|
||||
matcher.MatchBehaviour.Should().Be(MatchBehaviour.AcceptOnMatch);
|
||||
matcher.GetPatterns().Should().Contain("p");
|
||||
matcher.IgnoreCase.Should().BeTrue();
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,8 @@
|
||||
"Matchers": [
|
||||
{
|
||||
"Name": "ExactMatcher",
|
||||
"Pattern": "p1-v"
|
||||
"Pattern": "p1-v",
|
||||
"IgnoreCase": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -55,7 +56,8 @@
|
||||
"Matchers": [
|
||||
{
|
||||
"Name": "ExactMatcher",
|
||||
"Pattern": "p2-v"
|
||||
"Pattern": "p2-v",
|
||||
"IgnoreCase": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user