X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FGff3tests.java;h=faa4d430d73538f769f2db6024e212cfdb2f459d;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=c8cf63860f2242f81ca6dc172b9f4684104c8d7e;hpb=ab22918ab8fc67d30dad1fb1ae0f37e51f49df95;p=jalview.git diff --git a/test/jalview/io/Gff3tests.java b/test/jalview/io/Gff3tests.java index c8cf638..faa4d43 100644 --- a/test/jalview/io/Gff3tests.java +++ b/test/jalview/io/Gff3tests.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 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; import static org.testng.AssertJUnit.assertEquals; @@ -23,7 +43,7 @@ public class Gff3tests exonerateOutput = "examples/testdata/exonerateoutput.gff", simpleGff3file = "examples/testdata/simpleGff3.gff"; - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void testExonerateImport() { // exonerate does not tag sequences after features, so we have a more @@ -34,8 +54,8 @@ public class Gff3tests AlignFrame af = loader.LoadFileWaitTillLoaded(exonerateSeqs, FormatAdapter.FILE); - assertEquals("Unexpected number of DNA protein associations", 0, - af.getViewport().getAlignment().getCodonFrames().size()); + assertEquals("Unexpected number of DNA protein associations", 0, af + .getViewport().getAlignment().getCodonFrames().size()); af.loadJalviewDataFile(exonerateOutput, FormatAdapter.FILE, null, null); @@ -45,19 +65,17 @@ public class Gff3tests } - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void simpleGff3FileIdentify() { - assertEquals("Didn't recognise file correctly.", - IdentifyFile.GFF3File, + assertEquals("Didn't recognise file correctly.", IdentifyFile.GFF3File, new IdentifyFile().Identify(simpleGff3file, FormatAdapter.FILE)); } - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void simpleGff3FileClass() throws IOException { - AlignmentI dataset = new Alignment(new SequenceI[] - {}); + AlignmentI dataset = new Alignment(new SequenceI[] {}); FeaturesFile ffile = new FeaturesFile(simpleGff3file, FormatAdapter.FILE); @@ -66,7 +84,7 @@ public class Gff3tests checkDatasetfromSimpleGff3(dataset); } - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void simpleGff3FileLoader() throws IOException { AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded( @@ -77,11 +95,10 @@ public class Gff3tests checkDatasetfromSimpleGff3(af.getViewport().getAlignment().getDataset()); } - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void simpleGff3RelaxedIdMatching() throws IOException { - AlignmentI dataset = new Alignment(new SequenceI[] - {}); + AlignmentI dataset = new Alignment(new SequenceI[] {}); FeaturesFile ffile = new FeaturesFile(simpleGff3file, FormatAdapter.FILE); @@ -91,7 +108,7 @@ public class Gff3tests checkDatasetfromSimpleGff3(dataset); } - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void readGff3File() throws IOException { Gff3File gff3reader = new Gff3File(simpleGff3file, FormatAdapter.FILE); @@ -123,17 +140,16 @@ public class Gff3tests placeholderseq.equals(seq1.getSequenceAsString())); assertFalse("dummy replacement buggy for seq2", placeholderseq.equals(seq2.getSequenceAsString())); - assertNotNull("No features added to seq1", - seq1.getSequenceFeatures());// != null); + assertNotNull("No features added to seq1", seq1.getSequenceFeatures());// != + // null); assertEquals("Wrong number of features", 3, seq1.getSequenceFeatures().length); assertNull(seq2.getSequenceFeatures()); assertEquals( "Wrong number of features", 0, - seq2 - .getSequenceFeatures() == null ? 0 - : seq2.getSequenceFeatures().length); + seq2.getSequenceFeatures() == null ? 0 : seq2 + .getSequenceFeatures().length); assertTrue( "Expected at least one CDNA/Protein mapping for seq1", dataset.getCodonFrame(seq1) != null