PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
T4 text templates and code generation

B.
Stub types

C.
Shim types

D.
Hard-coded implementation

One Comment on “Which isolation method should you use?

  1. someguy says:

    Stubs implement interfaces or override members. But our dependencies are sealed, so that’s not an option.

    A and D are meaningless here, I think.

    That leaves shims, which are typically used for external dependencies which we can’t override (i.e. sealed.)




    0



    0

Leave a Reply