Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 7.27 KB

FakeQueryProcessor.Respond.md

File metadata and controls

104 lines (70 loc) · 7.27 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

FakeQueryProcessor.Respond Method

Overloads
Respond<TQuery,TQueryResult>(ICatResponse<TQueryResult>) Sets the response for a query type.
Respond<TQuery,TQueryResult>(Func<TQuery,ICatResponse<TQueryResult>>) Sets the response for a query type, built from the query.

FakeQueryProcessor.Respond<TQuery,TQueryResult>(ICatResponse<TQueryResult>) Method

Sets the response for a query type.

public Cat.UnitTesting.Queries.FakeQueryProcessor Respond<TQuery,TQueryResult>(Cat.Responses.Abstractions.ICatResponse<TQueryResult> response)
    where TQuery : Cat.Queries.Abstractions.ICatQuery<TQueryResult>;

Type parameters

TQuery

The query type.

TQueryResult

The type of the data the query returns.

Parameters

response Cat.Responses.Abstractions.ICatResponse<TQueryResult>

The response every query of this type gets.

Returns

FakeQueryProcessor
The fake, so calls can be chained.

FakeQueryProcessor.Respond<TQuery,TQueryResult>(Func<TQuery,ICatResponse<TQueryResult>>) Method

Sets the response for a query type, built from the query.

public Cat.UnitTesting.Queries.FakeQueryProcessor Respond<TQuery,TQueryResult>(System.Func<TQuery,Cat.Responses.Abstractions.ICatResponse<TQueryResult>> respond)
    where TQuery : Cat.Queries.Abstractions.ICatQuery<TQueryResult>;

Type parameters

TQuery

The query type.

TQueryResult

The type of the data the query returns.

Parameters

respond System.Func<TQuery,Cat.Responses.Abstractions.ICatResponse<TQueryResult>>

Builds the response from the query.

Returns

FakeQueryProcessor
The fake, so calls can be chained.