Your SlideShare is downloading. ×
One mock to far
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

One mock to far

132
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
132
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
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. A MOCK TOO FAR ... milipski michal-lipski Pragmatists.pl
  • 2. UNIT TEST test of small fragment of code that represents some functionality Run in isolation from external dependencies and other system functionalities
  • 3. REFACTORING Changing structure of code without affecting its behavior
  • 4. STUB MOCK For replacing a method with code that returns a specified result. For validating our expectation about methods calls that object should receive
  • 5. STUB For replacing a method with code that returns a specified result. STATE TESTING MOCK For validating our expectation about methods calls that object should receive BEHAVIORAL TESTING
  • 6. Command
  • 7. Command Query
  • 8. Command Incoming Query
  • 9. Command Incoming Outgoing Query
  • 10. Incoming Command
  • 11. Incoming Command
  • 12. https://github.com/michal­lipski/comand­query­and­mocks/tree /master/src/test/java/incoming_command
  • 13. Command Incoming Outgoing assert on public state change Query
  • 14. Incoming Query
  • 15. https://github.com/michal­lipski/comand­query­and­mocks/tree/m aster/src/test/java/incoming_query
  • 16. Command Incoming Outgoing Query assert on public state change assert on returned value
  • 17. Outgoing Command
  • 18. https://github.com/michal­lipski/comand­query­and­mocks/tree/ master/src/test/java/outgoing_command
  • 19. Command Query Incoming assert on public state change assert on returned value Outgoing verify mock
  • 20. Outgoing Query
  • 21. https://github.com/michal­lipski/comand­query­and­mocks/tree/m aster/src/test/java/outgoing_query
  • 22. Command Incoming Outgoing Query assert on public state change assert on returned value verify mock stub or avoid
  • 23. Command Incoming Outgoing Query assert on public state change assert on returned value verify mock stub or avoid