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


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

import java.util.List;

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


/**
 * JUnit Test for Language persistence lookup.

 */
public class LanguageTest extends AbstractLookupTestCase {

	/* (non-Javadoc)
	 * @see gov.va.med.esr.common.persistent.hibernate.lookup.AbstractLookupTestCase#getNamedQueries()
	 */
	protected QueryInfo[] getNamedQueries() {
		return new QueryInfo[] { new QueryInfo("languageQuery_FindAll") };
	}

    public void testGetAllLanguages() throws Exception {
        List<Language> languages = getLookupService().getAllLanguages();
        System.out.println("Lookup found " + ((languages!= null)?languages.size():" no ") + " languages");
        for (Language language : languages) {
            System.out.println(language);
        }
        //assertEquals(code, "eng");
    }
	
//	public void testGetCodeObject() throws Exception {
//		Language tester = getLookupService().getLanguageByCode("eng");
//		Language.Code code = (Language.Code) tester.getCodeObject();
//		System.out.println("Lookup had typed code: " + code);
//		assertEquals(code, "eng");
//	}
//	
//	public void testGetByCode() {
//		Language.Code code = Language.Code.getByCode("spa");
//		assertEquals(code, "spa");
//	}

}
