mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-15 14:53:37 +01:00
* wip * ... * . * ... * ... * path * url * b * t * client * . * RequestMessageMethodMatcherTests * . * h * . * fix tests * .
37 lines
791 B
C#
37 lines
791 B
C#
using System;
|
|
using AnyOfTypes;
|
|
using FluentAssertions;
|
|
using WireMock.Matchers;
|
|
using WireMock.Models;
|
|
using WireMock.Plugin;
|
|
using Xunit;
|
|
|
|
namespace WireMock.Net.Tests.Plugin;
|
|
|
|
public class PluginLoaderTests
|
|
{
|
|
public interface IDummy
|
|
{
|
|
}
|
|
|
|
[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();
|
|
}
|
|
|
|
[Fact]
|
|
public void Load_Invalid_ThrowsException()
|
|
{
|
|
// Act
|
|
Action a = () => PluginLoader.Load<IDummy>();
|
|
|
|
// Assert
|
|
a.Should().Throw<DllNotFoundException>();
|
|
}
|
|
} |