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
110
0
Share
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
47
big data
ngarneau
5
400
Other Decks in Programming
See All in Programming
Java 21/25 Virtual Threads 소개
debop
0
330
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
100
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
1.7k
20260315 AWSなんもわからん🥲
chiilog
2
190
感情を設計する
ichimichi
5
1.2k
存在論的プログラミング: 時間と存在を記述する
koriym
5
790
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
270
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
830
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
130
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Speed Design
sergeychernyshev
33
1.6k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
320
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
500
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Raft: Consensus for Rubyists
vanstee
141
7.4k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
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