/**
 * THE TestGetByID.java WRITEME...
 */
package org.starhope.appius.test;

import org.starhope.appius.user.AbstractUser;
import org.starhope.appius.user.User;

import com.tootsville.user.Toot;

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

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

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