How to mock data class?
Short answer: you don’t.
Instead…
4 Ways to Leverage Kotest Specs for More Robust Testing
When it comes to testing in Kotlin, we often default to jUnit as the go-to framework.
However, there’s an alternative that offers a variety of powerful features – Kotest.
Kotest provides a variety of spec styles, each with its unique capabilities, that make writing tests a breeze.
Are unit tests worth it?
In the realm of software, unit tests are like unsung heroes. They quietly play a crucial role, ensuring that each part of the code, or each “atomic unit,” behaves as it should. Let’s dive a bit deeper into this concept, keeping things simple and relatable. Imagine we’re talking about a car. Unit Tests: Checking the Basics […]
StateFlow vs SharedFlow
What’s the difference between SharedFlow and StateFlow? That’s actually a very common interview question. And here’s how you can answer it: Both SharedFlow and StateFlow are hot streams, but they serve slightly different purposes. Let’s answer with practical examples to better understand their use cases. SharedFlow SharedFlow is like a broadcast channel. It can emit […]
Design patterns every Android developer should know.
👉 Learn essential design patterns for Android development, suitable for every level—from beginner to expert developers. 👉 Understand how to write cleaner and more maintainable code, so your applications aren’t just a tangle of hard-to-understand logic.👉 Get hands-on experience with real-world examples, where experts will demonstrate how to implement these design patterns in a live […]
How to grow as an Android dev in 2023?
Link: https://www.youtube.com/watch?v=3KwPztAb5ng
How to refactor your code (without turning the project inside-out)
Are you stuck in a loop of having an old codebase that’s not testable, but not being able to refactor it because there’s no test coverage? This is a common challenge that many software development teams face, but there’s a way out. In this article, we’ll explore a 5-step process to break the cycle and improve […]
Idiomatic Kotlin in tests: idiomatic stubbings
In this article we will explore several ways of creating stubs… using Kotlin idioms.
Unit testing on Android – test pyramide
Are you programming for Android and wondering how to write tests for your app? Or maybe you don’t have any tests in your project and don’t know how to live? Get to know my philosophy of creating tests for Android.
De-mock your tests: practical recipes
Examples of de-mocking test code as presented on Droidcon Berlin 2022.