mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-17 07:36:47 +01:00
* net451 * tests : net462 * fixed tests * fix tests * readme * Code review * LocalFileSystemHandlerTests * refactor
37 lines
965 B
C#
37 lines
965 B
C#
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>();
|
|
}
|
|
}
|
|
} |