mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-26 19:11:04 +01:00
Handlebars Extension (#286)
* wip * HandlebarsRegistrationCallback * HandlebarsContextFactoryTests * 1.0.21.0 * fix sonar * LocalFileSystemHandler * readme * Fix System.IO.IOException
This commit is contained in:
@@ -29,6 +29,7 @@ namespace WireMock.Server
|
||||
|
||||
private readonly IWireMockLogger _logger;
|
||||
private readonly IFileSystemHandler _fileSystemHandler;
|
||||
private readonly IFluentMockServerSettings _settings;
|
||||
private readonly IOwinSelfHost _httpServer;
|
||||
private readonly IWireMockMiddlewareOptions _options = new WireMockMiddlewareOptions();
|
||||
|
||||
@@ -92,7 +93,7 @@ namespace WireMock.Server
|
||||
/// <param name="settings">The FluentMockServerSettings.</param>
|
||||
/// <returns>The <see cref="FluentMockServer"/>.</returns>
|
||||
[PublicAPI]
|
||||
public static FluentMockServer Start(IFluentMockServerSettings settings)
|
||||
public static FluentMockServer Start([NotNull] IFluentMockServerSettings settings)
|
||||
{
|
||||
Check.NotNull(settings, nameof(settings));
|
||||
|
||||
@@ -185,6 +186,7 @@ namespace WireMock.Server
|
||||
|
||||
private FluentMockServer(IFluentMockServerSettings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
settings.Logger = settings.Logger ?? new WireMockNullLogger();
|
||||
|
||||
_logger = settings.Logger;
|
||||
@@ -435,7 +437,7 @@ namespace WireMock.Server
|
||||
[PublicAPI]
|
||||
public IRespondWithAProvider Given(IRequestMatcher requestMatcher, bool saveToFile = false)
|
||||
{
|
||||
return new RespondWithAProvider(RegisterMapping, requestMatcher, _fileSystemHandler, saveToFile);
|
||||
return new RespondWithAProvider(RegisterMapping, requestMatcher, _settings, saveToFile);
|
||||
}
|
||||
|
||||
private void RegisterMapping(IMapping mapping, bool saveToFile)
|
||||
|
||||
Reference in New Issue
Block a user