mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-19 16:47:06 +01:00
Rename (WireMock.Pact.Models.V2)-Request to PactRequest and -Response to PactResponse (#767)
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
namespace WireMock.Pact.Models.V2
|
||||
namespace WireMock.Pact.Models.V2;
|
||||
|
||||
public class Interaction
|
||||
{
|
||||
public class Interaction
|
||||
{
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public string ProviderState { get; set; }
|
||||
public string ProviderState { get; set; }
|
||||
|
||||
public Request Request { get; set; } = new Request();
|
||||
public PactRequest Request { get; set; } = new PactRequest();
|
||||
|
||||
public Response Response { get; set; } = new Response();
|
||||
}
|
||||
public PactResponse Response { get; set; } = new PactResponse();
|
||||
}
|
||||
@@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Pact.Models.V2;
|
||||
|
||||
public class Request
|
||||
public class PactRequest
|
||||
{
|
||||
public IDictionary<string, string>? Headers { get; set; }
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Pact.Models.V2;
|
||||
|
||||
public class Response
|
||||
public class PactResponse
|
||||
{
|
||||
public object? Body { get; set; }
|
||||
|
||||
@@ -53,9 +53,9 @@ internal static class PactMapper
|
||||
return (filename, JsonUtils.SerializeAsPactFile(pact));
|
||||
}
|
||||
|
||||
private static Request MapRequest(RequestModel request, string path)
|
||||
private static PactRequest MapRequest(RequestModel request, string path)
|
||||
{
|
||||
return new Request
|
||||
return new PactRequest
|
||||
{
|
||||
Method = request.Methods?.FirstOrDefault() ?? DefaultMethod,
|
||||
Path = path,
|
||||
@@ -65,14 +65,14 @@ internal static class PactMapper
|
||||
};
|
||||
}
|
||||
|
||||
private static Response MapResponse(ResponseModel? response)
|
||||
private static PactResponse MapResponse(ResponseModel? response)
|
||||
{
|
||||
if (response == null)
|
||||
{
|
||||
return new Response();
|
||||
return new PactResponse();
|
||||
}
|
||||
|
||||
return new Response
|
||||
return new PactResponse
|
||||
{
|
||||
Status = MapStatusCode(response.StatusCode),
|
||||
Headers = MapResponseHeaders(response.Headers),
|
||||
|
||||
Reference in New Issue
Block a user