exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 6 discussion

Actual exam question from Microsoft's 70-486
Question #: 6
Topic #: 1
[All 70-486 Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
apostolin
Highly Voted 5 years, 9 months ago
Correct answer is: C.
upvoted 7 times
...
markcowell
Most Recent 4 years, 8 months ago
Its a Shim. C
upvoted 2 times
...
hungry_ape9000
5 years, 1 month ago
FINAL ANSWER: C is correct
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...