/*
 * The Gemma project
 * 
 * Copyright (c) 2007 University of British Columbia
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package ubic.gemma.ontology;

import java.util.Collection;

import junit.framework.TestCase;

public class OntologyServiceTest extends TestCase {

    public void testListAvailableOntologies() {
        Collection<Ontology> name = OntologyService.listAvailableOntologies();
        for ( Ontology ontology : name ) {
            if ( ontology == null ) continue;
            System.err.println( ontology );
        }
    }

}

@@ -713,357 +713,1172 @@
 ort 
-junit.framework.TestCase;%0A%0Apublic class OntologyServiceTest extends TestCase %7B%0A%0A    public void testListAvailableOntologies() %7B%0A        Collection%3COntology%3E name = OntologyService.listAvailableOntologies();%0A        for ( Ontology ontology : name ) %7B%0A            if ( ontology == null ) continue;%0A            System.err.println( ontology );%0A        %7D
+ubic.gemma.model.common.description.Characteristic;%0Aimport ubic.gemma.testing.BaseSpringContextTest;%0A%0A/**%0A * @author paul%0A */%0Apublic class OntologyServiceTest extends BaseSpringContextTest %7B%0A%0A    @Override%0A    protected void onSetUpInTransaction() throws Exception %7B%0A        super.onSetUpInTransaction();%0A        MgedOntologyService mgo = ( MgedOntologyService ) this.getBean( %22mgedOntologyService%22 );%0A        while ( !mgo.isOntologyLoaded() ) %7B%0A            Thread.sleep( 1000 );%0A            log.info( %22Waiting for Ontology to laod%22 );%0A        %7D%0A    %7D%0A%0A    public void testListAvailableOntologies() %7B%0A        Collection%3COntology%3E name = OntologyService.listAvailableOntologies();%0A        for ( Ontology ontology : name ) %7B%0A            if ( ontology == null ) continue;%0A            System.err.println( ontology );%0A        %7D%0A    %7D%0A%0A    public final void testFindExactMatch() throws Exception %7B%0A        OntologyService os = ( OntologyService ) this.getBean( %22ontologyService%22 );%0A        Collection%3CCharacteristic%3E name = os.findExactTerm( %22male%22,%0A                %22http://mged.sourceforge.net/ontologies/MGEDOntology.owl#Sex%22 );%0A        assertEquals( 1, name.size() );
 %0A   

test for findExactTerm