Skip to content

Commit f0f1eba

Browse files
author
Hai Nguyen
committed
change from @before to init
1 parent 6557cf2 commit f0f1eba

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ class RandomStringTest {
1616

1717
val charPool = ArrayList<Char>()
1818

19-
@BeforeEach
20-
fun charPool() {
21-
charPool.addAll('a'..'z');
22-
charPool.addAll('A'..'Z');
23-
charPool.addAll('0'..'9');
19+
init {
20+
charPool.addAll('a'..'z')
21+
charPool.addAll('A'..'Z')
22+
charPool.addAll('0'..'9')
2423
}
2524

2625
@Test

0 commit comments

Comments
 (0)