package uk.ac.ebi.phenotype.data.impress;

import static org.junit.Assert.fail;

import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;

import uk.ac.ebi.phenotype.dao.PhenotypePipelineDAO;
import uk.ac.ebi.phenotype.pojo.ObservationType;
import uk.ac.ebi.phenotype.pojo.Parameter;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:test-config.xml" })
@TransactionConfiguration
@Transactional
public class UtilitiesTest {

    @Autowired
    PhenotypePipelineDAO pDAO;
    

    @Test
    public void testCheckTypeParameterString() {
        Parameter p = pDAO.getParameterByStableId("ESLIM_003_001_006");
        String value= "2.092";
        ObservationType oType = Utilities.checkType(p, value);
   
        System.out.println(oType);
        assert(oType.equals(ObservationType.time_series));
    }

}

@@ -40,101 +40,8 @@
 s;%0A%0A
-import static org.junit.Assert.fail;%0A%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Ignore;%0A
 impo
@@ -59,16 +59,16 @@
 t.Test;%0A
+
 import o
@@ -432,17 +432,16 @@
 tional;%0A
-%0A
 import u
@@ -801,16 +801,64 @@
 AO pDAO;
+%0A%0A    @Autowired%0A    Utilities impressUtilities;
 %0A    %0A%0A 
@@ -1018,16 +1018,16 @@
 2.092%22;%0A
-
         
@@ -1050,16 +1050,23 @@
 oType = 
+impress
 Utilitie

fix the utilities test file t o incorporate the new non-static access of the utilities class