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
51
big data
ngarneau
5
410
Other Decks in Programming
See All in Programming
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
130
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.1k
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
990
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
140
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
27
30k
ジョジョの世界をXRで再現する
mofurune
0
160
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
120
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Agents on Rails - Rails at Scale 2026
irinanazarova
0
540
The Rails Doctrine Decade
koic
2
580
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How STYLIGHT went responsive
nonsquared
100
6.3k
Code Reviewing Like a Champion
maltzj
529
40k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
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