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

* HandleBarsFileFragment

* 1.0.17

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

No files matched your search

@@ -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)
{