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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the policy-specific interfaces in Polly?

A
  1. IRetryPolicy
  2. ITimeoutPolicy
  3. IBulkheadPolicy
  4. ICircuitBreakerPolicy
  5. IFallbackPolicy
  6. INoOpPolicy
  7. IPolicyWrap
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What interface does a policy registry implement?

A

IPolicyRegistry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly