Add support for HandleBars File (to read a file) (#278)

* HandleBarsFileFragment

* 1.0.17

* {{File}}
This commit is contained in:
Stef Heyenrath
2019-06-05 16:00:25 +02:00
committed by GitHub
parent eed73ee8b3
commit bd030594d5
13 changed files with 246 additions and 16 deletions

View File

@@ -50,6 +50,12 @@ namespace WireMock.Net.ConsoleApplication
return File.ReadAllBytes(Path.GetFileName(path) == path ? Path.Combine(GetMappingFolder(), path) : path);
}
/// <inheritdoc cref="IFileSystemHandler.ReadResponseBodyAsFile"/>
public string ReadResponseBodyAsString(string path)
{
return File.ReadAllText(Path.GetFileName(path) == path ? Path.Combine(GetMappingFolder(), path) : path);
}
/// <inheritdoc cref="IFileSystemHandler.FileExists"/>
public bool FileExists(string path)
{