add random string test

This commit is contained in:
Hai Nguyen 2018-10-30 09:27:49 +08:00
parent cb1b3d5a5c
commit ff8380a954

View File

@ -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")
}
}