Skip to content

Latest commit

 

History

History
164 lines (108 loc) · 11.8 KB

FakeServiceRequestProcessor.Respond.md

File metadata and controls

164 lines (108 loc) · 11.8 KB
Clean Architecture Toolkit for .NET
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications.
It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design.

|   HOME   |   REPO OVERVIEW   |   DEMO   |   CAT.UNITTESTING   |

Code Reference

FakeServiceRequestProcessor.Respond Method

Overloads
Respond<TRequest,TResponse>(ICatResponse<TResponse>) Sets the response for a service request with a result.
Respond<TRequest,TResponse>(Func<TRequest,ICatResponse<TResponse>>) Sets the response for a service request with a result, built from the request.
Respond<TRequest>(ICatResponse) Sets the response for a service request without a result.
Respond<TRequest>(Func<TRequest,ICatResponse>) Sets the response for a service request without a result, built from the request.

FakeServiceRequestProcessor.Respond<TRequest,TResponse>(ICatResponse<TResponse>) Method

Sets the response for a service request with a result.

public Cat.UnitTesting.ServiceRequests.FakeServiceRequestProcessor Respond<TRequest,TResponse>(Cat.Responses.Abstractions.ICatResponse<TResponse> response)
    where TRequest : Cat.ServiceRequests.Abstractions.ICatServiceRequest<TResponse>;

Type parameters

TRequest

The service request type.

TResponse

The type of the result.

Parameters

response Cat.Responses.Abstractions.ICatResponse<TResponse>

The response every request of this type gets.

Returns

FakeServiceRequestProcessor
The fake, so calls can be chained.

FakeServiceRequestProcessor.Respond<TRequest,TResponse>(Func<TRequest,ICatResponse<TResponse>>) Method

Sets the response for a service request with a result, built from the request.

public Cat.UnitTesting.ServiceRequests.FakeServiceRequestProcessor Respond<TRequest,TResponse>(System.Func<TRequest,Cat.Responses.Abstractions.ICatResponse<TResponse>> respond)
    where TRequest : Cat.ServiceRequests.Abstractions.ICatServiceRequest<TResponse>;

Type parameters

TRequest

The service request type.

TResponse

The type of the result.

Parameters

respond System.Func<TRequest,Cat.Responses.Abstractions.ICatResponse<TResponse>>

Builds the response from the request.

Returns

FakeServiceRequestProcessor
The fake, so calls can be chained.

FakeServiceRequestProcessor.Respond<TRequest>(ICatResponse) Method

Sets the response for a service request without a result.

public Cat.UnitTesting.ServiceRequests.FakeServiceRequestProcessor Respond<TRequest>(Cat.Responses.Abstractions.ICatResponse response)
    where TRequest : Cat.ServiceRequests.Abstractions.ICatServiceRequest;

Type parameters

TRequest

The service request type.

Parameters

response ICatResponse

The response every request of this type gets.

Returns

FakeServiceRequestProcessor
The fake, so calls can be chained.

FakeServiceRequestProcessor.Respond<TRequest>(Func<TRequest,ICatResponse>) Method

Sets the response for a service request without a result, built from the request.

public Cat.UnitTesting.ServiceRequests.FakeServiceRequestProcessor Respond<TRequest>(System.Func<TRequest,Cat.Responses.Abstractions.ICatResponse> respond)
    where TRequest : Cat.ServiceRequests.Abstractions.ICatServiceRequest;

Type parameters

TRequest

The service request type.

Parameters

respond System.Func<TRequest,ICatResponse>

Builds the response from the request.

Returns

FakeServiceRequestProcessor
The fake, so calls can be chained.