FileDocCategorySizeDatePackage
UserDBTest.javaAPI DocExample930Sat Dec 02 19:43:56 GMT 2000jabadot

UserDBTest

public class UserDBTest extends Object
Standalone test program for UserDB.
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: UserDBTest.java,v 1.4 2000/12/03 00:43:57 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)


		System.out.println("Testing Getting One...");
		User iadmin = UserDB.getInstance().getUser("iadmin");
		System.out.println(iadmin);

		System.out.println("Testing Getting All...");
		ArrayList al = UserDB.getInstance().getUserList();
		Iterator it = al.iterator();
		while (it.hasNext()) {
			System.out.println(it.next());
		}

		System.out.println("Testing privs");
		iadmin.setPassword("guten abend");
		if (iadmin.checkPassword("foo"))
			System.out.println("setPassword failed");
		if (!iadmin.checkPassword("guten abend"))
			System.out.println("checkPassword failed");
		System.out.println("All done");
		System.exit(0);