Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Pluralsight

Unit Testing with JUnit 5 and Kotlin

via Pluralsight

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Kotlin is rapidly growing on the JVM (Java Virtual Machine) and this course will show you how to use JUnit 5 to make sure this code is tested and testable.

JUnit 5 is the de-facto standard testing framework on the JVM. It is used to test application code in many areas including enterprise, desktop, and mobile applications. In this course, Unit Testing with JUnit 5 and Kotlin 1, you will learn how to set up JUnit to test Kotlin code, including some of the issues you will encounter that are unique to Kotlin. First, you will see how to set up your environment to use JUnit 5 for Kotlin including setting up Gradle and Maven environments and using an IDE to run the tests. Next, you will be introduced to Kluent, a Kotlin fluent assertions library. Then, you will see how to change assertions using this fluent syntax, as well as new, cleaner ways of writing assertions using the Kluent APIs. Finally, you will explore ‘mocking’ using MockK, a mocking framework written in and for Kotlin. When you are finished with this course, you will have the skills to test Kotlin code using JUnit and how to refactor code to make it testable.

Syllabus

  • Course Overview 1min
  • Writing Your First Test 18mins
  • Writing More Complex Tests 25mins
  • Writing Fluent Assertions with the Kluent Library in Kotlin 15mins
  • Writing Mocks with MockK 26mins
  • Design for Testing 35mins

Taught by

Kevin Jones

Reviews

4.8 rating at Pluralsight based on 20 ratings

Start your review of Unit Testing with JUnit 5 and Kotlin

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.