mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-26 09:49:21 +02:00
Add more info to IWireMockServer
This commit is contained in:
@@ -51,7 +51,11 @@ namespace WireMock.Server
|
|||||||
event NotifyCollectionChangedEventHandler LogEntriesChanged;
|
event NotifyCollectionChangedEventHandler LogEntriesChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds the catch all mapping.
|
/// Adds a 'catch all mapping'
|
||||||
|
///
|
||||||
|
/// - matches all Paths and any Methods
|
||||||
|
/// - priority is set to 1000
|
||||||
|
/// - responds with a 404 "No matching mapping found"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void AddCatchAllMapping();
|
void AddCatchAllMapping();
|
||||||
|
|
||||||
@@ -83,13 +87,18 @@ namespace WireMock.Server
|
|||||||
//IRespondWithAProvider Given(IRequestMatcher requestMatcher, bool saveToFile = false);
|
//IRespondWithAProvider Given(IRequestMatcher requestMatcher, bool saveToFile = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a static mapping file and adds or updates the mapping.
|
/// Reads a static mapping file and adds or updates a single mapping.
|
||||||
|
///
|
||||||
|
/// Calling this method manually forces WireMock.Net to read and apply the specified static mapping file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path.</param>
|
/// <param name="path">The path to the static mapping file.</param>
|
||||||
bool ReadStaticMappingAndAddOrUpdate([NotNull] string path);
|
bool ReadStaticMappingAndAddOrUpdate([NotNull] string path);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the static mappings from a folder.
|
/// Reads the static mappings from a folder.
|
||||||
|
/// (This method is also used when WireMockServerSettings.ReadStaticMappings is set to true.
|
||||||
|
///
|
||||||
|
/// Calling this method manually forces WireMock.Net to read and apply all static mapping files in the specified folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
/// <param name="folder">The optional folder. If not defined, use {CurrentFolder}/__admin/mappings</param>
|
||||||
void ReadStaticMappings([CanBeNull] string folder = null);
|
void ReadStaticMappings([CanBeNull] string folder = null);
|
||||||
@@ -157,12 +166,16 @@ namespace WireMock.Server
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register the mappings (via <see cref="MappingModel"/>).
|
/// Register the mappings (via <see cref="MappingModel"/>).
|
||||||
|
///
|
||||||
|
/// This can be used if you have 1 or more <see cref="MappingModel"/> defined and want to register these in WireMock.Net directly instead of using the fluent syntax.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mappings">The MappingModels</param>
|
/// <param name="mappings">The MappingModels</param>
|
||||||
IWireMockServer WithMapping(params MappingModel[] mappings);
|
IWireMockServer WithMapping(params MappingModel[] mappings);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register the mappings (via json string).
|
/// Register the mappings (via json string).
|
||||||
|
///
|
||||||
|
/// This can be used if you the mappings as json string defined and want to register these in WireMock.Net directly instead of using the fluent syntax.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mappings">The mapping(s) as json string.</param>
|
/// <param name="mappings">The mapping(s) as json string.</param>
|
||||||
IWireMockServer WithMapping(string mappings);
|
IWireMockServer WithMapping(string mappings);
|
||||||
|
|||||||
Reference in New Issue
Block a user