mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-26 03:11:56 +01:00
RegexExtended in settings (#700)
* Add extra unittest for RegexExtended * settings
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using NFluent;
|
||||
using WireMock.Matchers;
|
||||
using Xunit;
|
||||
@@ -70,6 +72,32 @@ namespace WireMock.Net.Tests.Matchers
|
||||
Check.That(result).IsEqualTo(0.0d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegexMatcher_IsMatch_RegexExtended_Guid()
|
||||
{
|
||||
// Assign
|
||||
var matcher = new RegexMatcher(@"\GUIDB", true);
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch(Guid.NewGuid().ToString("B"));
|
||||
|
||||
// Assert
|
||||
result.Should().Be(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegexMatcher_IsMatch_Regex_Guid()
|
||||
{
|
||||
// Assign
|
||||
var matcher = new RegexMatcher(@"\GUIDB", true, false, false);
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch(Guid.NewGuid().ToString("B"));
|
||||
|
||||
// Assert
|
||||
result.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegexMatcher_IsMatch_IgnoreCase()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace WireMock.Net.Tests.RegularExpressions
|
||||
/// <summary>
|
||||
/// Input guid used for testing
|
||||
/// </summary>
|
||||
public Guid InputGuid { get; } = Guid.NewGuid();
|
||||
public Guid InputGuid => Guid.NewGuid();
|
||||
|
||||
[Fact]
|
||||
public void RegexExtended_GuidB_Pattern()
|
||||
|
||||
Reference in New Issue
Block a user