mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-29 05:42:14 +02:00
Support Microsoft.AspNetCore for net 4.6.1 and up (#185)
* net451 * tests : net462 * fixed tests * fix tests * readme * Code review * LocalFileSystemHandlerTests * refactor
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using NFluent;
|
||||
using WireMock.Handlers;
|
||||
using Xunit;
|
||||
|
||||
namespace WireMock.Net.Tests.Handlers
|
||||
{
|
||||
public class LocalFileSystemHandlerTests
|
||||
{
|
||||
private LocalFileSystemHandler sut = new LocalFileSystemHandler();
|
||||
|
||||
[Fact]
|
||||
public void LocalFileSystemHandler_GetMappingFolder()
|
||||
{
|
||||
// Act
|
||||
string result = sut.GetMappingFolder();
|
||||
|
||||
// Assert
|
||||
Check.That(result).EndsWith(Path.Combine("__admin", "mappings"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LocalFileSystemHandler_CreateFolder_Throws()
|
||||
{
|
||||
// Act
|
||||
Check.ThatCode(() => sut.CreateFolder(null)).Throws<ArgumentNullException>();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LocalFileSystemHandler_WriteMappingFile_Throws()
|
||||
{
|
||||
// Act
|
||||
Check.ThatCode(() => sut.WriteMappingFile(null, null)).Throws<ArgumentNullException>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user