Skip to main content
ActiveJavaTypeScriptPythonC#GoKotlinTesting

Mock 101: The Art of Testing

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.

Features

  • 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

Exercises

Random Number Kata

Implement a game where the player must guess a random number in three attempts. Ideal for practicing dummies and stubs.

Print Date Kata

Learn how to test a method that prints the current date. Perfect for practicing spies, strict mocks and fakes.

Technologies

  • Java (JUnit 5)

  • TypeScript (Jest)

  • Python (pytest)

  • C# (xUnit)

  • Go (testing)

  • Kotlin (JUnit 5)

Additional Resources

This project includes supplementary material used in talks and workshops:

Links

Statistics

Last commit
2025-10-24

Tech Stack

JavaTypeScriptPythonC#GoKotlinTesting