3. Unit Testing Policies Flashcards
1
Q
What interfaces are the most important to us when it comes to unit testing policies and why?
A
The execution interfaces IAsyncPolicy
and IAsyncPolicy
.
These are very important because they provide the interface of the ExecuteAsync
method for Retry, Timeout, Fallback, Circuit Breaker, and the Cache policies.
2
Q
What are the policy-specific interfaces in Polly?
A
IRetryPolicy
ITimeoutPolicy
IBulkheadPolicy
ICircuitBreakerPolicy
IFallbackPolicy
INoOpPolicy
IPolicyWrap
3
Q
What kind of interfaces do we use in order to test non-execute methods of policies?
A
Policy-specific interfaces such as IRetryPolicy
, ITimeoutPolicy
, and more.
4
Q
What interface does a policy registry implement?
A
IPolicyRegistry