Your SlideShare is downloading. ×
0
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Mock object
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Mock object

1,101

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,101
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×