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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
47
big data
ngarneau
5
400
Other Decks in Programming
See All in Programming
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
520
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
250
安いハードウェアでVulkan
fadis
0
190
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
570
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
190
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
210
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
220
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
120
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.1k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Spectacular Lies of Maps
axbom
PRO
1
630
WCS-LA-2024
lcolladotor
0
480
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
240
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How to Talk to Developers About Accessibility
jct
2
150
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
260
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How GitHub (no longer) Works
holman
316
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
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