/*
 * The Gemma project
 * 
 * Copyright (c) 2006 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.loader.genome.taxon;

import java.util.Collection;

import ubic.gemma.model.common.description.LocalFile;
import junit.framework.TestCase;

/**
 * @author pavlidis
 * @version $Id$
 */
public class TaxonFetcherTest extends TestCase {

    // FIXME - this test takes too long.
    public void testFetch() throws Exception {
        TaxonFetcher fetcher = new TaxonFetcher();
        fetcher.setDeleteAfterUnpack( false );
        Collection<LocalFile> files = fetcher.fetch();
        assertEquals( 9, files.size() );
        for ( LocalFile file : files ) {
            if ( file.getLocalURL().toString().endsWith( "names.dmp" ) ) {
                return;
            }
        }
        fail( "No names.dmp file" );

    }

}

/*
 * The Gemma project
 * 
 * Copyright (c) 2006 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.loader.genome.taxon;

import java.util.Collection;

import ubic.gemma.model.common.description.LocalFile;
import junit.framework.TestCase;

/**
 * @author pavlidis
 * @version $Id$
 */
public class TaxonFetcherTest extends TestCase {

    // FIXME : design a better test; the old one takes too long.
    public void testFetch() throws Exception {
        // TaxonFetcher fetcher = new TaxonFetcher();
        // fetcher.setDeleteAfterUnpack( false );
        // Collection<LocalFile> files = fetcher.fetch();
        // assertEquals( 9, files.size() );
        // for ( LocalFile file : files ) {
        // if ( file.getLocalURL().toString().endsWith( "names.dmp" ) ) {
        // return;
        // }
        // }
        // fail( "No names.dmp file" );

    }

}

comment out very slow test