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
MockK and Truth - Unit Tests - Android
Search
Moro
January 03, 2022
Programming
0
150
MockK and Truth - Unit Tests - Android
First contact with the libraries: MockK and Truth.
Moro
January 03, 2022
Tweet
Share
More Decks by Moro
See All by Moro
More Accessible Apps - Android
gabrielbmoro
0
9
Variables and Tips - Android
gabrielbmoro
0
10
Migrating an Existing App to Compose - Android
gabrielbmoro
0
12
Recycler View and Performance - Android
gabrielbmoro
0
12
Repository Pattern and Productivity - Android
gabrielbmoro
0
13
What is new in Android Jetpack?
gabrielbmoro
0
18
List Users - Android
gabrielbmoro
0
5
Working with Collections - Kotlin
gabrielbmoro
0
12
Dependency Inversion - Example
gabrielbmoro
0
12
Other Decks in Programming
See All in Programming
Developer Joy - The New Paradigm
hollycummins
1
310
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
コード生成なしでモック処理を実現!ovechkin-dm/mockioで学ぶメタプログラミング
qualiarts
0
220
Devoxx BE 2025 Loom lab
josepaumard
0
110
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
110
iOSでSVG画像を扱う
kishikawakatsumi
0
140
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
15
6.4k
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
600
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.1k
SODA - FACT BOOK(JP)
sodainc
1
8.6k
Le côté obscur des IA génératives
pascallemerrer
0
150
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.4k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
70
4.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
920
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
Designing Experiences People Love
moore
142
24k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
The Language of Interfaces
destraynor
162
25k
Practical Orchestrator
shlominoach
190
11k
How to Ace a Technical Interview
jacobian
280
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Designing for Performance
lara
610
69k
Transcript
Mockk & Truth Your Unit Tests better for reading By
Moro
MockK It is a powerful mocking library for Kotlin It
is a library to help us write more fluent assertions for Android. Truth
Example In this case, the MainViewModel has the responsibility for
defining the first destination, where the app starts. Has email stored? Dashboard Screen Welcome Screen Yes No
MainViewModel
MainViewModel Dependency
Mocking the Dependency
Mocking the Dependency
MainViewModel Test - Case #1 Has email stored? Dashboard Screen
Yes
MainViewModel Test - Case #2 Has email stored? Welcome Screen
No
None