Skip to content

Commit 3ee9050

Browse files
author
Hai Nguyen
committed
change from @before to init
1 parent e27d5f4 commit 3ee9050

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ const val STRING_LENGTH = 10
1313
const val ALPHANUMERIC_REGEX = "[a-zA-Z0-9]+"
1414

1515
class RandomStringTest {
16-
17-
private val charPool = ArrayList<Char>()
18-
19-
init {
20-
charPool.addAll('a'..'z')
21-
charPool.addAll('A'..'Z')
22-
charPool.addAll('0'..'9')
23-
}
16+
private val charPool : List<Char> = ('a'..'z') + ('A'..'Z') + ('0'..'9')
2417

2518
@Test
2619
fun givenAStringLength_whenUsingJava_thenReturnAlphanumericString() {

0 commit comments

Comments
 (0)