From 24d152cdabd02197b2200aa356d272248fde18e5 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 27 Nov 2025 12:37:06 +0100 Subject: [PATCH] Convert sentence to tip in Kotlin testing chapter This commit also moves the text to a more appropriate section of the chapter. --- .../ROOT/pages/languages/kotlin/spring-projects-in.adoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc b/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc index 17a48703cde..495ac3337a5 100644 --- a/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc +++ b/framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc @@ -322,6 +322,14 @@ This section addresses testing with the combination of Kotlin and Spring Framewo The recommended testing framework is https://junit.org/[JUnit] along with https://mockk.io/[Mockk] for mocking. +[TIP] +==== +Kotlin lets you specify meaningful test function names between backticks (```). + +For a concrete example, see the `+++`Find all users on HTML page`()+++` test function later +in this section. +==== + NOTE: If you are using Spring Boot, see {spring-boot-docs-ref}/features/kotlin.html#features.kotlin.testing[this related documentation]. @@ -352,7 +360,6 @@ file with a `spring.test.constructor.autowire.mode = all` property. [[per_class-lifecycle]] === `PER_CLASS` Lifecycle -Kotlin lets you specify meaningful test function names between backticks (+++```+++). With JUnit Jupiter, Kotlin test classes can use the `@TestInstance(TestInstance.Lifecycle.PER_CLASS)` annotation to enable single instantiation of test classes, which allows the use of `@BeforeAll` and `@AfterAll` annotations on non-static methods, which is a good fit for Kotlin.