Class RestShapeMatchData

Namespace
ProtoTest.Rest
Assembly
ProtoTest.Rest.dll

Data payload sent when a ShapeMatcher validation succeeds/runs.

public sealed record RestShapeMatchData : IEquatable<RestShapeMatchData>
Inheritance
RestShapeMatchData
Implements
Inherited Members
Extension Methods

Constructors

RestShapeMatchData(string, IReadOnlyList<string>, Type, int?)

Data payload sent when a ShapeMatcher validation succeeds/runs.

public RestShapeMatchData(string RequestIdentifier, IReadOnlyList<string> MatchedProperties, Type TargetType, int? StatusCode = null)

Parameters

RequestIdentifier string
MatchedProperties IReadOnlyList<string>
TargetType Type
StatusCode int?

Properties

MatchedProperties

public IReadOnlyList<string> MatchedProperties { get; init; }

Property Value

IReadOnlyList<string>

Method

The HTTP method the shape was matched on, for example GET, when the producer knows it. Structured routing data: consumers must not recover the method from RequestIdentifier, which is the display form.

public string? Method { get; init; }

Property Value

string

RequestIdentifier

public string RequestIdentifier { get; init; }

Property Value

string

RouteTemplate

The route template the shape was matched on, for example /orders/{id}, when the producer knows it. Structured routing data; see Method.

public string? RouteTemplate { get; init; }

Property Value

string

StatusCode

public int? StatusCode { get; init; }

Property Value

int?

TargetType

public Type TargetType { get; init; }

Property Value

Type