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


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

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


/**
 * Initial javadoc for class VAFacilityTest.
 * TODO - Add content here
 * 
 * Created Nov 10, 2005 10:40:51 AM
 * @author DNS   BOHMEG
 */
public class VAFacilityTest extends AbstractLookupTestCase {

	/* (non-Javadoc)
	 * @see gov.va.med.esr.common.persistent.hibernate.lookup.AbstractLookupTestCase#getNamedQueries()
	 */
	protected QueryInfo[] getNamedQueries() {
		// TODO Auto-generated method stub
		return null;
	}

	public void testMedicalTreatingFacility() throws Exception {
		VAFacility tester = getLookupService().getVaFacilityByStationNumber(VAFacility.CODE_IRON_MOUNTAIN_VA_MEDICAL_CENTER.getName());
		VAFacility.Code code = (VAFacility.Code) tester.getCodeObject();
		System.out.println("Lookup had typed code: " + code);
		System.out.println("Lookup isMedicalTreating: " + tester.getType().getIsMedicalTreating());
		assertEquals(code, VAFacility.CODE_IRON_MOUNTAIN_VA_MEDICAL_CENTER);
		assertTrue(tester.getType().getIsMedicalTreating());
	}
	
	public void testNonMedicalTreatingFacility() throws Exception {
		VAFacility tester = getLookupService().getVaFacilityByStationNumber(VAFacility.CODE_MVR.getName());
		VAFacility.Code code = (VAFacility.Code) tester.getCodeObject();
		System.out.println("Lookup had typed code: " + code);
		System.out.println("Lookup isMedicalTreating: " + tester.getType().getIsMedicalTreating());
		assertEquals(code, VAFacility.CODE_MVR);
		assertFalse(tester.getType().getIsMedicalTreating());
	}		
}
