@Test public void testExceptions() { final char[] DUMMY = new char[]{'a'}; try { CommonsLang3RandomStringUtils.random(-1); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, true, true); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, DUMMY); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(1, new char[0]); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, ""); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, (String)null); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, 'a', 'z', false, false); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, 'a', 'z', false, false, DUMMY); fail(""); } catch (final IllegalArgumentException ex) {} try { CommonsLang3RandomStringUtils.random(-1, 'a', 'z', false, false, DUMMY, new Random()); fail(""); } catch (final IllegalArgumentException ex) {} }
public static String random(final int count) { return random(count, false, false); }
CommonsLang3RandomStringUtils { public static String random(final int count) { return random(count, false, false); } }
CommonsLang3RandomStringUtils { public static String random(final int count) { return random(count, false, false); } CommonsLang3RandomStringUtils(); }
CommonsLang3RandomStringUtils { public static String random(final int count) { return random(count, false, false); } CommonsLang3RandomStringUtils(); static String random(final int count); static String randomAscii(final int count); static String randomAlphabetic(final int count); static String randomAlphanumeric(final int count); static String randomNumeric(final int count); static String random(final int count, final boolean letters, final boolean numbers); static String random(final int count, final int start, final int end, final boolean letters, final boolean numbers); static String random(final int count, final int start, final int end, final boolean letters, final boolean numbers, final char... chars); static String random(int count, int start, int end, final boolean letters, final boolean numbers,
                                final char[] chars, final Random random); static String random(final int count, final String chars); static String random(final int count, final char... chars); }
CommonsLang3RandomStringUtils { public static String random(final int count) { return random(count, false, false); } CommonsLang3RandomStringUtils(); static String random(final int count); static String randomAscii(final int count); static String randomAlphabetic(final int count); static String randomAlphanumeric(final int count); static String randomNumeric(final int count); static String random(final int count, final boolean letters, final boolean numbers); static String random(final int count, final int start, final int end, final boolean letters, final boolean numbers); static String random(final int count, final int start, final int end, final boolean letters, final boolean numbers, final char... chars); static String random(int count, int start, int end, final boolean letters, final boolean numbers,
                                final char[] chars, final Random random); static String random(final int count, final String chars); static String random(final int count, final char... chars);  }