X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2Fgff%2FGff3HelperTest.java;h=bf038acecd371554f300c88061b293ef89b2fc69;hb=717215fa552eba980616292d76cd0032c548e459;hp=420b0320128800f1b72ee5676c0e069a75c028b7;hpb=8f920d337154e092f5f9056ffde3cdf2735eca43;p=jalview.git diff --git a/test/jalview/io/gff/Gff3HelperTest.java b/test/jalview/io/gff/Gff3HelperTest.java index 420b032..bf038ac 100644 --- a/test/jalview/io/gff/Gff3HelperTest.java +++ b/test/jalview/io/gff/Gff3HelperTest.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.io.gff; import static org.testng.AssertJUnit.assertEquals; @@ -13,16 +33,25 @@ import jalview.datamodel.Sequence; import jalview.datamodel.SequenceDummy; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; +import jalview.gui.JvOptionPane; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class Gff3HelperTest { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + /** * Test processing one PASA GFF line giving a match from forward strand to * forward strand @@ -161,7 +190,7 @@ public class Gff3HelperTest "GAATTCGTTCATGTAGGTTGATTTTTATT"); seq.createDatasetSequence(); AlignmentI align = new Alignment(new SequenceI[] {}); - + // mapping from gi|68711 12923-13060 to gi|N37351 1-138 String[] gff = "gi|68711\tblat-pasa\tcDNA_match\t12923\t13060\t98.55\t+\t.\tID=align_68;Target=gi|N37351 1 138 +" .split("\\t"); @@ -179,7 +208,7 @@ public class Gff3HelperTest // (this is important for 'align cdna to genome' to work correctly) assertEquals(1, align.getCodonFrames().size()); AlignedCodonFrame mapping = align.getCodonFrames().get(0); - + /* * 'dnaseqs' (map from) is here [gi|68711] * 'aaseqs' (map to) is here [gi|N37351] @@ -192,8 +221,7 @@ public class Gff3HelperTest assertEquals(1, mapping.getdnaToProt().length); assertEquals(2, mapping.getdnaToProt()[0].getFromRanges().size()); // the two spliced dna ranges are combined in one MapList - assertArrayEquals(new int[] { 12923, 13060 }, - mapping.getdnaToProt()[0] + assertArrayEquals(new int[] { 12923, 13060 }, mapping.getdnaToProt()[0] .getFromRanges().get(0)); assertArrayEquals(new int[] { 13411, 13550 }, mapping.getdnaToProt()[0] .getFromRanges().get(1));