September 2019
Intermediate to advanced
462 pages
11h 3m
English
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 16, Asynchronous Programming. The overall design of the application that we’ll create is shown in the following figure.

The AirportApp.kt file will hold the main() function to invoke a top-level function, written in the AirportStatus.kt file, within a com.agiledeveloper.airportstatus package. That function will use an Airport data class ...
Read now
Unlock full access