/*
 * The baseCode project
 * 
 * Copyright (c) 2013 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.basecode.ontology.ncbo;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.util.Collection;

import org.junit.Test;

import ubic.basecode.ontology.model.OntologyTerm;

/**
 * @author Paul
 * @version $Id$
 */
public class OntologyLookupTest {

    // private static OntologyLookup ol = new OntologyLookupImpl();

    //
    // @Test
    // public void testGetSynonyms() {
    // Collection<String> synonyms = ol.getSynonyms( "http://sig.uw.edu/fma#Intestine" );
    //
    // }

    @Test
    public void testMatch() {
        OntologyLookup ol = new OntologyLookupImpl();
        Collection<OntologyTerm> matches = ol.match( "O80-O84.9", 1 );
        assertTrue( !matches.isEmpty() );
        assertEquals( 1, matches.size() );
    }

}

@@ -1,10 +1,11 @@
 /*
+%0D
 %0A * The 
@@ -20,20 +20,22 @@
  project
+%0D
 %0A * 
+%0D
 %0A * Copy
@@ -79,20 +79,22 @@
 Columbia
+%0D
 %0A * 
+%0D
 %0A * Lice
@@ -204,16 +204,17 @@
 nce with
+%0D
 %0A * the 
@@ -261,20 +261,22 @@
 cense at
+%0D
 %0A * 
+%0D
 %0A * http
@@ -313,20 +313,22 @@
 ENSE-2.0
+%0D
 %0A * 
+%0D
 %0A * Unle
@@ -438,16 +438,17 @@
 buted on
+%0D
 %0A * an %22
@@ -557,16 +557,17 @@
  for the
+%0D
 %0A * spec
@@ -636,20 +636,22 @@
 License.
+%0D
 %0A */
+%0D
 %0Apackage
@@ -679,17 +679,19 @@
 gy.ncbo;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -727,16 +727,17 @@
 tEquals;
+%0D
 %0Aimport 
@@ -771,17 +771,19 @@
 ertTrue;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -803,17 +803,19 @@
 lection;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -829,17 +829,19 @@
 it.Test;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -886,13 +886,16 @@
 erm;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A * 
@@ -906,16 +906,17 @@
 hor Paul
+%0D
 %0A * @ver
@@ -924,20 +924,22 @@
 ion $Id$
+%0D
 %0A */
+%0D
 %0Apublic 
@@ -964,17 +964,19 @@
 upTest %7B
-%0A
+%0D%0A%0D
 %0A    // 
@@ -1039,16 +1039,19 @@
 l();
-%0A
+%0D%0A%0D
 %0A    //
+%0D
 %0A   
@@ -1055,24 +1055,25 @@
     // @Test
+%0D
 %0A    // publ
@@ -1095,24 +1095,25 @@
 Synonyms() %7B
+%0D
 %0A    // Coll
@@ -1190,23 +1190,25 @@
 tine%22 );
+%0D
 %0A    //
+%0D
 %0A    // 
@@ -1208,17 +1208,19 @@
     // %7D
-%0A
+%0D%0A%0D
 %0A    @Te
@@ -1221,16 +1221,17 @@
    @Test
+%0D
 %0A    pub
@@ -1252,17 +1252,20 @@
 atch() %7B
-%0A
+%0D%0A//
         
@@ -1309,17 +1309,20 @@
 pImpl();
-%0A
+%0D%0A//
         
@@ -1383,17 +1383,20 @@
 9%22, 1 );
-%0A
+%0D%0A//
         
@@ -1424,25 +1424,28 @@
 isEmpty() );
-%0A
+%0D%0A//
         asse
@@ -1478,14 +1478,18 @@
 ) );
+%0D
 %0A    %7D
-%0A
+%0D%0A%0D
 %0A%7D
+%0D
 %0A

test is failing with a ncbo server error - commented out.