Which isolation method should you use?

You are authoring unit tests. The unit tests must test code that consumes sealed classes. You need to create,
maintain, and inject dependencies in the unit tests. Which isolation method should you use?

You are authoring unit tests. The unit tests must test code that consumes sealed classes. You need to create,
maintain, and inject dependencies in the unit tests. Which isolation method should you use?

A.
T4 text templates and code generation

B.
Stub types

C.
Shim types

D.
Hard-coded implementation



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Test

Test

“Shim types are one of two technologies that the Microsoft Fakes Framework uses to let you easily isolate components under test from the environment. Shims divert calls to specific methods to code that you write as part of your test.”