Class MethodSimulator
Interface for an object that simulates an API method and can produce simulated HTTP responses for a certain request path.
Implements
Namespace: Tableau.Migration.Net.Simulation
Assembly: Tableau.Migration.dll
Syntax
public record MethodSimulator : IEquatable<MethodSimulator>
Constructors
MethodSimulator(IRequestMatcher, IResponseBuilder)
Interface for an object that simulates an API method and can produce simulated HTTP responses for a certain request path.
Declaration
public MethodSimulator(IRequestMatcher RequestMatcher, IResponseBuilder ResponseBuilder)
Parameters
Type | Name | Description |
---|---|---|
IRequestMatcher | RequestMatcher | The request matcher. |
IResponseBuilder | ResponseBuilder | The response builder. |
Properties
RequestMatcher
The request matcher.
Declaration
public IRequestMatcher RequestMatcher { get; init; }
Property Value
Type | Description |
---|---|
IRequestMatcher |
ResponseBuilder
The response builder.
Declaration
public IResponseBuilder ResponseBuilder { get; init; }
Property Value
Type | Description |
---|---|
IResponseBuilder |
ResponseOverride
Gets the override response builder.
Declaration
public IResponseBuilder? ResponseOverride { get; set; }
Property Value
Type | Description |
---|---|
IResponseBuilder |
Methods
ClearResponseOverride()
Clears the current override response builder.
Declaration
public MethodSimulator ClearResponseOverride()
Returns
Type | Description |
---|---|
MethodSimulator | The current method simulator, for fluent API usage. |
ToString()
Returns a string which represents the object instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |