Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
One mock too far
Search
Michal Lipski
January 28, 2014
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
One mock too far
Michal Lipski
January 28, 2014
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
1.7k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
Railsバージョンを4倍にした話
optim
0
350
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
ジョジョの世界をXRで再現する
mofurune
0
160
ActionController meets Protocol Buffers
sorah
0
520
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
Featured
See All Featured
Being A Developer After 40
akosma
92
590k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Exploring anti-patterns in Rails
aemeredith
4
540
Building the Perfect Custom Keyboard
takai
2
910
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
A Tale of Four Properties
chriscoyier
163
24k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Documentation Writing (for coders)
carmenintech
77
5.6k
Transcript
A MOCK TOO FAR ... milipski michal-lipski Pragmatists.pl
UNIT TEST test of small fragment of code that represents
some functionality Run in isolation from external dependencies and other system functionalities
REFACTORING Changing structure of code without affecting its behavior
MOCK STUB For replacing a method with code that returns
a specified result. For validating our expectation about methods calls that object should receive
MOCK STUB For replacing a method with code that returns
a specified result. For validating our expectation about methods calls that object should receive STATE TESTING BEHAVIORAL TESTING
None
None
None
Command
Command Query
Command Query Incoming
Command Query Incoming Outgoing
Incoming Command
Incoming Command
https://github.com/michallipski/comandqueryandmocks/tree /master/src/test/java/incoming_command
Command Query Incoming assert on public state change Outgoing
Incoming Query
https://github.com/michallipski/comandqueryandmocks/tree/m aster/src/test/java/incoming_query
Command Query Incoming assert on public state change assert on
returned value Outgoing
Outgoing Command
https://github.com/michallipski/comandqueryandmocks/tree/ master/src/test/java/outgoing_command
Command Query Incoming assert on public state change assert on
returned value Outgoing verify mock
Outgoing Query
https://github.com/michallipski/comandqueryandmocks/tree/m aster/src/test/java/outgoing_query
Command Query Incoming assert on public state change assert on
returned value Outgoing verify mock stub or avoid
Command Query Incoming assert on public state change assert on
returned value Outgoing verify mock stub or avoid