Mock Object2011   3   5
How it works               SUT               Mock Object   SUT2011   3   5
When to use it               Untested Requirement                   (pp.273)                                 ↑2011   3   5
Mock Object                          Test Stub                                      equals                                ...
Mock Object                  Equality               Assertions           comparator               Mock Object             ...
Implementation Notes               Mock Object        SUT                      Test Spy2011   3   5
Mock Object                       4                      fixture                      3                          result ver...
Fixture Setup               MockObject         /               Exercise SUT               MocK Object               Result...
Construction               Four-Phase Test   fixture setup phase                        Mock Object               Configurat...
Installation               Test Double SUT               SUT               Dependency Injection   Dependency Lookup2011   ...
Usage               SUT Mock Object               Assertion               (      Mock Object                              ...
Mock Object   SUT                             →happy path2011   3   5
Final Verification                          1                         Mock Object toolkits    teardown                     ...
Motivating Example2011   3   5
Refactoring Notes                       Test Double               Mock Object                                 SUT         ...
2011   3   5
2011   3   5
JUnit3      Mock Object    TestCase                                    Assertion Method   static                   xUnit F...
Example: Mock Object               (Dynamically Generated)2011   3   5
Further Reading                  xUnit                Mock Object                                        Mock Object      ...
Upcoming SlideShare
Loading in …5
×

Mock object

1,440 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,440
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mock object

  1. 1. Mock Object2011 3 5
  2. 2. How it works SUT Mock Object SUT2011 3 5
  3. 3. When to use it Untested Requirement (pp.273) ↑2011 3 5
  4. 4. Mock Object Test Stub equals Mock Object equals →Equality Pollution (pp.217)2011 3 5
  5. 5. Mock Object Equality Assertions comparator Mock Object Mock Object Mock Object Mock Object2011 3 5
  6. 6. Implementation Notes Mock Object SUT Test Spy2011 3 5
  7. 7. Mock Object 4 fixture 3 result verification phase (“final verification” )2011 3 5
  8. 8. Fixture Setup MockObject / Exercise SUT MocK Object Result verification “final verification” Fixture teardown2011 3 5
  9. 9. Construction Four-Phase Test fixture setup phase Mock Object Configuration with Expected Values Test Double Mock Object →Hard-Coded Test Double2011 3 5
  10. 10. Installation Test Double SUT SUT Dependency Injection Dependency Lookup2011 3 5
  11. 11. Usage SUT Mock Object Assertion ( Mock Object )2011 3 5
  12. 12. Mock Object SUT →happy path2011 3 5
  13. 13. Final Verification 1 Mock Object toolkits teardown final Verification Method2011 3 5
  14. 14. Motivating Example2011 3 5
  15. 15. Refactoring Notes Test Double Mock Object SUT Mock Object 1 final verification method2011 3 5
  16. 16. 2011 3 5
  17. 17. 2011 3 5
  18. 18. JUnit3 Mock Object TestCase Assertion Method static xUnit Family NUnit static Assert Ruby Test::Unit mixins Assert2011 3 5
  19. 19. Example: Mock Object (Dynamically Generated)2011 3 5
  20. 20. Further Reading xUnit Mock Object Mock Object Test Stub Fake Object →Appnendix B(pp.741)2011 3 5

×