Files
WireMock.Net/test/WireMock.Net.Tests/Handlers/LocalFileSystemHandlerTests.cs
Stef Heyenrath b57d118c3d Support Microsoft.AspNetCore for net 4.6.1 and up (#185)
* net451

* tests : net462

* fixed tests

* fix tests

* readme

* Code review

* LocalFileSystemHandlerTests

* refactor
2018-08-17 18:52:29 +02:00

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>();
}
}
}