| 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 | |
|||||
A query processor for unit tests. It records every query and returns what the test says. A query without a set up response throws, because a fake cannot guess the data.
public class FakeQueryProcessor : Cat.Queries.Abstractions.ICatQueryProcessorInheritance System.Object → FakeQueryProcessor
Implements ICatQueryProcessor
| Fields | |
|---|---|
| _responses |
| Properties | |
|---|---|
| Queries | Every query that was processed, in order. |
| Methods | |
|---|---|
| Of<T>() | Gives the processed queries of one type, in order. |
| Process<TQueryResult>(ICatQuery<TQueryResult>) | Runs a query and blocks until it finishes. Prefer ProcessAsync<TQueryResult>(ICatQuery<TQueryResult>, CancellationToken) when you can. |
| ProcessAsync<TQueryResult>(ICatQuery<TQueryResult>, CancellationToken) | Runs a query. |
| Reset() | Clears the recorded queries and the set up responses. |
| 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. |