Implement PatternAsFile for StringMatcher (#651)

This commit is contained in:
Stef Heyenrath
2021-10-15 08:54:12 +02:00
committed by GitHub
parent a2a581c84b
commit 57cc616aa3
43 changed files with 817 additions and 491 deletions

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using WireMock.Util;
using WireMock.Validation;
@@ -130,6 +130,12 @@ namespace WireMock.Handlers
return File.ReadAllBytes(AdjustPath(filename));
}
/// <inheritdoc cref="IFileSystemHandler.ReadFileAsString"/>
public string ReadFileAsString(string filename)
{
return File.ReadAllText(AdjustPath(Check.NotNullOrEmpty(filename, nameof(filename))));
}
/// <summary>
/// Adjusts the path to the MappingFolder.
/// </summary>
@@ -140,4 +146,4 @@ namespace WireMock.Handlers
return Path.Combine(GetMappingFolder(), filename);
}
}
}
}