Search⌘ K
AI Features

The Code Under Test

Explore how to design and test Kotlin code with a real-world asynchronous airport status app. Learn to apply a test-first approach using KotlinTest, set up necessary testing tools, and implement code that interacts with remote web services. Understand how to write minimal testable code while managing asynchronous data fetching and sorting.

We'll cover the following...

Application design

To practice writing automated tests for Kotlin code, we’ll pick a sample application. We’ll create an asynchronous program that will print, in sorted order of name, the status of different airports. The program will fetch the necessary data from a remote web service, like we saw in Chapter 17, Asynchronous Programming. ...