Intro to testing Ktor controllers

Let’s suppose that we want to dismiss all calls for api/restricted endpoint if they don’t have special header, in this case „X-Special-Header”. We access header via get PipelineContext  and check if that value is null or blank. If so, we respond with HTTP 403. If given header is present,  we proceed with some business logic …

Intro to testing Ktor controllers 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