/********************************************************************
 * Copyright © 2005 VHA. All rights reserved
 ********************************************************************/


package gov.va.med.esr.common.persistent.hibernate.lookup;

import gov.va.med.esr.common.model.lookup.Gender;


/**
 * Initial javadoc for class GenderTest.
 * TODO - Add content here
 * 
 * Created Aug 13, 2005 12:32:02 AM
 * @author DNS   BOHMEG
 */
public class GenderTest extends AbstractLookupTestCase {

	/* (non-Javadoc)
	 * @see gov.va.med.esr.common.persistent.hibernate.lookup.AbstractLookupTestCase#getNamedQueries()
	 */
	protected QueryInfo[] getNamedQueries() {
		// TODO Auto-generated method stub
		return new QueryInfo[] { new QueryInfo("genderQuery_FindAll") };
	}
	
	public void testGetCodeObject() throws Exception {
		Gender tester = getLookupService().getGenderByCode(Gender.MALE.getName());
		Gender.Code code = (Gender.Code) tester.getCodeObject();
		System.out.println("Lookup had typed code: " + code);
		assertEquals(code, Gender.MALE);
	}
	
	public void testGetByCode() {
		Gender.Code code = Gender.Code.getByCode(Gender.FEMALE.getName());
		assertEquals(code, Gender.FEMALE);
	}

}
