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

Answer: C

Explanation:

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. Many methods return different results dependent on external conditions, but a shim is under the control of your test and can return consistent results at every call. This makes your tests much easier to write.

References: http://msdn.microsoft.com/en-us/library/hh549176.aspx

Latest 70-486 Dumps Valid Version with 255 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments