JUnit Testing Random Strings
807605Oct 1 2007 — edited Oct 1 2007Hi All,
I'm new to JUnit testing and have been assigned a task to JUnit test a random string. e.g.
function String returnRandomString(){
Random r = new Random();
String[] a = new String[]{"String1","String2",String3"};
return a[r.nextInt(3)];
}
If somebody could point me in the right direction it would be greatly appreciated.
Sam.
Edited by: sam.gribbles on Sep 30, 2007 9:19 PM