Workshop to learn test doubles in multiple programming languages.
This repository contains practical exercises to learn how to use the different types of test doubles (dummies, stubs, spies, mocks and fakes) in multiple programming languages.
Structured exercises: Two main katas to practice different types of test doubles
Multiple languages: Templates available in Java, TypeScript, Python, C#, Go and Kotlin
No libraries: Learn to create your own test doubles from scratch
Solutions included: Complete examples and solutions with Mockito in Java
Implement a game where the player must guess a random number in three attempts. Ideal for practicing dummies and stubs.
Learn how to test a method that prints the current date. Perfect for practicing spies, strict mocks and fakes.
Java (JUnit 5)
TypeScript (Jest)
Python (pytest)
C# (xUnit)
Go (testing)
Kotlin (JUnit 5)
This project includes supplementary material used in talks and workshops:
📊 Presentation "Mock 101: The Art of Testing"