Uncategorized

Assert softly – when one assertion is not enough

It’s usually in our best interest to keep one assertion per test method. Yet, situation when more than one check in single test method is present may occur. Why this may be a problem?Generally, JVM testing frameworks, such as Junit makes use of AssertionExceptions. If such exception is thrown during test block execution, test stops …

Assert softly – when one assertion is not enough Read More »

Building Unit Tests for ViewModel in TDD style

Your view model class usually has several functionalities. It somehow fetches data, it optionally maps your data entities to displayable entities, handles clicks and performs action for given events. You want to be sure that after refactor your code will still work perfectly. To achieve that you need to write and maintain unit tests. I …

Building Unit Tests for ViewModel in TDD style Read More »

KotlinUnitTesting – repository with examples

This repository contains examples of basic unit tests written in Kotlin. In specific directories you can find gradle buildscript with needed dependencies and configuration, simple unit test and parameterized test. rozkminiacz/KotlinUnitTesting Kotlin Unit Testing Examples. Contribute to rozkminiacz/KotlinUnitTesting development by creating an account on GitHub. GitHubrozkminiacz