diff --git a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt new file mode 100644 index 0000000000..b8d0bd49cd --- /dev/null +++ b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt @@ -0,0 +1,18 @@ + +import org.junit.jupiter.api.Test +import java.util.concurrent.ThreadLocalRandom +import kotlin.test.assertTrue + +class RandomNumberTest { + + @Test + fun whenRandomNumberWithJavaUtilMath_thenResultIsBetween0And1() { + val source = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + var test = Random().ints(outputStrLength, 0, source.length) + .asSequence() + .map(source::get) + .joinToString("") + print("message") + } + +} \ No newline at end of file