/**
 * THE TestGetByID.java WRITEME...
 */
package com.tootsville.test;

import org.starhope.appius.user.AbstractUser;
import org.starhope.appius.user.GeneralUser;
import org.starhope.appius.user.Nomenclator;


/**
 * WRITEME: Document this type. twheys@gmail.com Jan 11, 2010
 * 
 * @author <a href="mailto:twheys@gmail.com@resinteractive.com">Tim Heys</a>
 * 
 */
public class TestGetByID {
    /**
     * <pre>
     * twheys@gmail.com Jan 11, 2010
     * </pre>
     * 
     * TO getByID WRITEME...
     */
    private static void getByID () {
        final AbstractUser user = Nomenclator.getUserByID (55276);
        if (null == user) {
            System.out.println ("-- USER IS NULL");
            return;
        }
        System.out.println ("-- Got " + user.getAvatarLabel ());
        final GeneralUser toot = (GeneralUser) Nomenclator.getUserByID (55276);
        if (null == toot) {
            System.out.println ("-- TOOT IS NULL");
            return;
        }
        System.out.println ("-- Got " + toot.getUserName ());
    }

    /**
     * <pre>
     * twheys@gmail.com Jan 11, 2010
     * </pre>
     * 
     * TO getByLogin WRITEME...
     * 
     */
    private static void getByLogin () {
        final AbstractUser user = Nomenclator.getUserByLogin ("mouser");
        if (null == user) {
            System.out.println ("-- USER IS NULL");
            return;
        }
        System.out.println ("-- Got " + user.getUserID ());
        final GeneralUser toot = (GeneralUser) Nomenclator.getUserByLogin ("mouser");
        if (null == toot) {
            System.out.println ("-- TOOT IS NULL");
            return;
        }
        System.out.println ("-- Got " + toot.getUserID ());
    }

    /**
     * 
     * <pre>
     * twheys@gmail.com Jan 11, 2010
     * </pre>
     * 
     * TO main WRITEME...
     * 
     * @param args WRITEME
     */
    public static void main (final String args[]) {
        TestGetByID.getByID ();
        TestGetByID.getByLogin ();
    }
}
