add random string test
This commit is contained in:
parent
cb1b3d5a5c
commit
ff8380a954
@ -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")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user