Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mocks, stubs & seams
Search
ngarneau
January 15, 2014
Programming
0
110
Mocks, stubs & seams
OpenCode talk about unit testing and advanced techniques using mocks stubs & seams
ngarneau
January 15, 2014
Tweet
Share
More Decks by ngarneau
See All by ngarneau
Introduction au machine learning avec Scitkit-learn
ngarneau
0
46
big data
ngarneau
5
400
Other Decks in Programming
See All in Programming
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
CSC307 Lecture 07
javiergs
PRO
1
550
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
240
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
310
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
590
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
220
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
130
Featured
See All Featured
The Curse of the Amulet
leimatthew05
1
8.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Un-Boring Meetings
codingconduct
0
200
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
220
Docker and Python
trallard
47
3.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
Designing Experiences People Love
moore
144
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
150
Automating Front-end Workflow
addyosmani
1371
200k
Transcript
mocks, stubs & seams Nicolas Garneau
stubs Using stubs to break dependencies
seams we are used to it! dependency!
seams we can create a seam in the method call
seams or via a setter
stubs A stub is not like a mock but it
looks like
mocks Use mock to test interaction between objects
mocks The Observer Pattern Observable «interface» attachObserver() detachObserver() notify() ConcreteObservable
setState() getState() Observer «interface» update() ConcreteObserver update()
mocks mock it! expect the call only once attach it
Hell yeah that’s a seam! acts as a test