/*
 * Copyright (c) 2007-2011 by The Broad Institute of MIT and Harvard.  All Rights Reserved.
 *
 * This software is licensed under the terms of the GNU Lesser General Public License (LGPL),
 * Version 2.1 which is available at http://www.opensource.org/licenses/lgpl-2.1.php.
 *
 * THE SOFTWARE IS PROVIDED "AS IS." THE BROAD AND MIT MAKE NO REPRESENTATIONS OR
 * WARRANTES OF ANY KIND CONCERNING THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING,
 * WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, WHETHER
 * OR NOT DISCOVERABLE.  IN NO EVENT SHALL THE BROAD OR MIT, OR THEIR RESPECTIVE
 * TRUSTEES, DIRECTORS, OFFICERS, EMPLOYEES, AND AFFILIATES BE LIABLE FOR ANY DAMAGES
 * OF ANY KIND, INCLUDING, WITHOUT LIMITATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
 * ECONOMIC DAMAGES OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER
 * THE BROAD OR MIT SHALL BE ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT
 * SHALL KNOW OF THE POSSIBILITY OF THE FOREGOING.
 */

package org.broad.igv.tools.parsers;

import org.broad.igv.feature.genome.Genome;
import org.broad.igv.tools.IgvTools;
import org.broad.igv.tools.converters.GCTtoIGVConverter;
import org.broad.igv.util.ResourceLocator;
import org.broad.igv.util.TestUtils;
import org.junit.Before;
import org.junit.Test;

import java.io.File;
import java.io.IOException;

import static org.broad.igv.util.TestUtils.loadGenome;

/**
 * @author jrobinso
 * @date Oct 9, 2010
 */
public class GCTtoIGVConverterTest {

    Genome genome;

    @Before
    public void setup() throws IOException {
        genome = loadGenome("/Users/jrobinso/projects/client/genomes/hg18.genome");
    }


    @Test
    public void testDescriptionMapping() throws IOException {
        String gctFile = "test/data/gct/small.gct";
        File igvFile = new File("test/data/gct/small.gct.igv");

        ResourceLocator locator = new ResourceLocator(gctFile);
        GCTtoIGVConverter.convert(locator, igvFile, null, 50000, null, genome);


    }


    @Test
    public void testAffyMapping() throws IOException {
        String gctFile = "test/data/gct/affy_human.gct";
        File igvFile = new File("test/data/gct/affy_human.gct.igv");

        ResourceLocator locator = new ResourceLocator(gctFile);
        GCTtoIGVConverter.convert(locator, igvFile, null, 50000, null, genome);

    }

}

@@ -1153,45 +1153,8 @@
 me;%0A
-import org.broad.igv.tools.IgvTools;%0A
 impo
@@ -1264,32 +1264,19 @@
 org.
-broad.igv.util.TestUtils
+junit.After
 ;%0Aim
@@ -1533,16 +1533,34 @@
  genome;
+%0A    File igvFile;
 %0A%0A    @B
@@ -1584,17 +1584,17 @@
 void set
-u
+U
 p() thro
@@ -1644,61 +1644,199 @@
 e(%22/
-Users/jrobinso/projects/client/genomes/hg18.genome%22);
+test/data/genomes/hg18.genome%22);%0A        igvFile = null;%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A        if (igvFile != null) %7B%0A            igvFile.delete();%0A        %7D
 %0A   
@@ -1948,29 +1948,33 @@
 st/data/gct/
-small
+igv_test2
 .gct%22;%0A     
@@ -1968,37 +1968,32 @@
 2.gct%22;%0A        
-File 
 igvFile = new Fi
@@ -2014,13 +2014,17 @@
 gct/
-small
+igv_test2
 .gct
@@ -2176,18 +2176,16 @@
 enome);%0A
-%0A%0A
     %7D%0A%0A%0A
@@ -2310,29 +2310,24 @@
 t%22;%0A        
-File 
 igvFile = ne
@@ -2515,17 +2515,16 @@
 enome);%0A
-%0A
     %7D%0A%0A%7D

Update GCTtoIGVConverterTest to include test data and correct paths.