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
Mocks, stubs & seams
Search
ngarneau
January 15, 2014
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mocks, stubs & seams
OpenCode talk about unit testing and advanced techniques using mocks stubs & seams
ngarneau
January 15, 2014
More Decks by ngarneau
See All by ngarneau
Introduction au machine learning avec Scitkit-learn
ngarneau
0
49
big data
ngarneau
5
400
Other Decks in Programming
See All in Programming
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
130
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
170
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
450
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
240
自分的「カンファレンスの楽しみ方」
syumai
0
200
AIエージェント時代のコードレビューを設計する
nogu66
6
2.6k
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
930
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
220
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
300
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
260
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
150
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Code Reviewing Like a Champion
maltzj
528
40k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
450
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The browser strikes back
jonoalderson
0
1.7k
Six Lessons from altMBA
skipperchong
29
4.5k
Technical Leadership for Architectural Decision Making
baasie
3
560
Designing for Performance
lara
611
70k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
The untapped power of vector embeddings
frankvandijk
2
1.9k
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