01: package com.ecyrd.jspwiki.util;
02:
03: import com.ecyrd.jspwiki.TextUtil;
04:
05: import junit.framework.*;
06:
07: public class TextUtilTest extends TestCase {
08: public TextUtilTest(String s) {
09: super (s);
10: }
11:
12: public void testGenerateRandomPassword() {
13: for (int i = 0; i < 1000; i++) {
14: assertEquals("pw", TextUtil.PASSWORD_LENGTH, TextUtil
15: .generateRandomPassword().length());
16: }
17: }
18:
19: public static Test suite() {
20: return new TestSuite(TextUtilTest.class);
21: }
22: }
|