From f0f1eba7b91e9743f15fd4e7b5d53bbccd5bac41 Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Fri, 16 Nov 2018 10:04:48 +0800 Subject: [PATCH] change from @before to init --- .../test/kotlin/com/baeldung/random/RandomStringTest.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt index 0715870403..f44b0cd437 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt +++ b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt @@ -16,11 +16,10 @@ class RandomStringTest { val charPool = ArrayList() - @BeforeEach - fun charPool() { - charPool.addAll('a'..'z'); - charPool.addAll('A'..'Z'); - charPool.addAll('0'..'9'); + init { + charPool.addAll('a'..'z') + charPool.addAll('A'..'Z') + charPool.addAll('0'..'9') } @Test