Skip to content

Commit 7c65b57

Browse files
committed
Polish Kotlin chapter
1 parent ab32dc8 commit 7c65b57

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/docs/asciidoc/languages/kotlin.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ is https://junit.org/junit5/[JUnit 5], as well as https://mockk.io/[Mockk] for m
597597
==== Constructor injection
598598

599599
As described in the <<testing#testcontext-junit-jupiter-di#spring-web-reactive,dedicated section>>, JUnit 5 allows
600-
constructor injection of beans which is pretty useful with Kotlin in order to use `val` instead of `lateinit var `.
600+
constructor injection of beans which is pretty useful with Kotlin in order to use `val` instead of `lateinit var`.
601601

602602

603603
====
@@ -619,8 +619,8 @@ You can also use `@Autowired` at constructor level to autowire all parameters.
619619
----
620620
@SpringJUnitConfig(TestConfig::class)
621621
class OrderServiceIntegrationTests @Autowired constructor(
622-
val orderService: OrderService,
623-
val customerService: CustomerService) {
622+
val orderService: OrderService,
623+
val customerService: CustomerService) {
624624
625625
// tests that use the injected OrderService and CustomerService
626626
}
@@ -630,16 +630,16 @@ class OrderServiceIntegrationTests @Autowired constructor(
630630

631631
==== `PER_CLASS` Lifecycle
632632

633-
Kotlin lets you specify meaningful test function names between backticks (\`).
633+
Kotlin lets you specify meaningful test function names between backticks (```).
634634
As of JUnit 5, Kotlin test classes can use the `@TestInstance(TestInstance.Lifecycle.PER_CLASS)`
635635
annotation to enable a single instantiation of test classes, which allows the use of `@BeforeAll` and `@AfterAll`
636636
annotations on non-static methods, which is a good fit for Kotlin.
637637

638-
You can now change the default behavior to `PER_CLASS` thanks to a
638+
You can also change the default behavior to `PER_CLASS` thanks to a
639639
`junit-platform.properties` file with a
640640
`junit.jupiter.testinstance.lifecycle.default = per_class` property.
641641

642-
The following example `@BeforeAll` and `@AfterAll` annotations on non-static methods:
642+
The following example demonstrates `@BeforeAll` and `@AfterAll` annotations on non-static methods:
643643

644644
====
645645
[source]

0 commit comments

Comments
 (0)