mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-16 07:06:54 +01:00
* matcher
* wip
* fix
* <VersionPrefix>1.4.0</VersionPrefix>
* .
* x
* ?
* netstandard2.1
* {}
* test
* Fix: Assembly with same name is already loaded
* _format file
* AssemblyFile = $"WireMock.CodeHelper.Class{Guid.NewGuid()}"
* AssemblyFile = $"WireMock.CodeHelper.Class{Guid.NewGuid().ToString().Replace("-", "")}"
* GC
* x
* remove load ex
* ret
* readme
* no GC
* GetImplementationTypeByInterface
* ``
* PluginLoader
* type
35 lines
767 B
C#
35 lines
767 B
C#
using System;
|
|
using FluentAssertions;
|
|
using WireMock.Matchers;
|
|
using WireMock.Plugin;
|
|
using Xunit;
|
|
|
|
namespace WireMock.Net.Tests.Plugin
|
|
{
|
|
public class PluginLoaderTests
|
|
{
|
|
public interface IDummy
|
|
{
|
|
}
|
|
|
|
[Fact]
|
|
public void Load_Valid()
|
|
{
|
|
// Act
|
|
var result = PluginLoader.Load<ICSharpCodeMatcher>(MatchBehaviour.AcceptOnMatch, "x");
|
|
|
|
// Assert
|
|
result.Should().NotBeNull();
|
|
}
|
|
|
|
[Fact]
|
|
public void Load_Invalid_ThrowsException()
|
|
{
|
|
// Act
|
|
Action a = () => PluginLoader.Load<IDummy>();
|
|
|
|
// Assert
|
|
a.Should().Throw<DllNotFoundException>();
|
|
}
|
|
}
|
|
} |