mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-21 08:59:50 +01:00
Set description when converting MappingModel to IRespondWithAProvider (#1317)
Adding a mapping with a description to `WireMockServer.WithMapping` did not include the description to the resulting `IRespondWithAProvider`, which means that calling `WireMockServer.SavePact` does not populate the description in the contract file. This PR includes the description when mapping from `MappingModel` to `IRespondWithAProvider`.
This commit is contained in:
@@ -76,6 +76,11 @@ public partial class WireMockServer
|
||||
respondProvider = respondProvider.WithTitle(mappingModel.Title!);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(mappingModel.Description))
|
||||
{
|
||||
respondProvider = respondProvider.WithDescription(mappingModel.Description!);
|
||||
}
|
||||
|
||||
if (mappingModel.Priority != null)
|
||||
{
|
||||
respondProvider = respondProvider.AtPriority(mappingModel.Priority.Value);
|
||||
|
||||
Reference in New Issue
Block a user