!-

import
fitnesse.slim.test
java.lang

Wrong method parameter types raise a meaningful exception

script test slim
one int twenty

Wrong constructor parameter types raise a meaningful exception

TODO this is not as good as for methods
script test slim five


Wrong static method parameter types raise a meaningful exception


called as constructor

script java.time.Instant.now 8.9

script java.time.Instant.ofEpochSecond Hello

Correct calls
script java.lang.String.valueOf 5

script String.valueOf 5

called as method


script Boolean 0
$sPass= String.valueOf 5
$sFail= java.time.Instant.ofEpochSecond aWrongValue
$sFail= java.time.Instant.from 9.8




Known Limitations (TODO)

Would expect that this uses the String(String) constructor but it rather uses String(Character) and truncates the string
script String Hello
check to string Hello
check get class class java.lang.String



-!