Add MatchOperator "Or", "And" and "Average" for patterns (#755)

* wip

* ...

* .

* ...

* ...

* path

* url

* b

* t

* client

* .

* RequestMessageMethodMatcherTests

* .

* h

* .

* fix tests

* .
This commit is contained in:
Stef Heyenrath
2022-06-09 21:31:54 +02:00
committed by GitHub
parent 1f23022460
commit 0441c1d85e
95 changed files with 5736 additions and 5111 deletions

View File

@@ -6,33 +6,32 @@ using WireMock.Models;
using WireMock.Plugin;
using Xunit;
namespace WireMock.Net.Tests.Plugin
namespace WireMock.Net.Tests.Plugin;
public class PluginLoaderTests
{
public class PluginLoaderTests
public interface IDummy
{
public interface IDummy
{
}
}
[Fact]
public void Load_Valid()
{
// Act
AnyOf<string, StringPattern> pattern = "x";
var result = PluginLoader.Load<ICSharpCodeMatcher>(MatchBehaviour.AcceptOnMatch, pattern);
[Fact]
public void Load_Valid()
{
// Act
AnyOf<string, StringPattern> pattern = "x";
var result = PluginLoader.Load<ICSharpCodeMatcher>(MatchBehaviour.AcceptOnMatch, MatchOperator.Or, pattern);
// Assert
result.Should().NotBeNull();
}
// Assert
result.Should().NotBeNull();
}
[Fact]
public void Load_Invalid_ThrowsException()
{
// Act
Action a = () => PluginLoader.Load<IDummy>();
[Fact]
public void Load_Invalid_ThrowsException()
{
// Act
Action a = () => PluginLoader.Load<IDummy>();
// Assert
a.Should().Throw<DllNotFoundException>();
}
// Assert
a.Should().Throw<DllNotFoundException>();
}
}