mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-29 22:02:16 +02: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:
@@ -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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user