package uk.ac.ebi.quickgo.geneproduct.model;

import uk.ac.ebi.quickgo.geneproduct.GeneProductREST;
import uk.ac.ebi.quickgo.geneproduct.service.ServiceConfig;
import uk.ac.ebi.quickgo.rest.controller.ControllerValidationHelper;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;

/**
 * @author Tony Wardell
 * Date: 02/06/2016
 * Time: 09:59
 * Created with IntelliJ IDEA.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = {GeneProductREST.class})
@WebAppConfiguration
public class GeneProductDbXRefIDFormatsIT {

    @Autowired
    private ControllerValidationHelper validator;

    @Test
    public void successfullyValidateRNACentralID(){

        assertThat(validator.validateCSVIds("EBI-11166735"),contains("EBI-11166735"));
        assertThat(validator.validateCSVIds("URS00000CCDAD_559292"),contains("URS00000CCDAD_559292"));

    }
}

@@ -1077,200 +1077,567 @@
 ()%7B%0A
-%0A        assertThat(validator.validateCSVIds(%22EBI-11166735%22),contains(%22EBI-11166735%22));%0A        assertThat(validator.validateCSVIds(%22URS00000CCDAD_559292%22),contains(%22URS00000CCDAD_559292
+        assertThat(validator.validateCSVIds(%22URS0000000001_77133%22),contains(%22URS0000000001_77133%22));%0A%0A    %7D%0A%0A    @Test%0A    public void successfullyValidateIntActIDs()%7B%0A        assertThat(validator.validateCSVIds(%22EBI-11166735%22),contains(%22EBI-11166735%22));%0A        assertThat(validator.validateCSVIds(%22EBI-10021614%22),contains(%22EBI-10021614%22));%0A    %7D%0A%0A    @Test%0A    public void successfullyValidateUniProtIDs()%7B%0A        assertThat(validator.validateCSVIds(%22A0A000%22),contains(%22A0A000%22));%0A        assertThat(validator.validateCSVIds(%22A1E959%22),contains(%22A1E959
 %22));%0A
-%0A
     

Create tests for all Gene Product suppliers (3 databases)