X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fjalview%2Fdatamodel%2FAlignmentTest.java;h=f5f271d4bb14fa4062f75dd896244ac5553419b2;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=2eaae9408d14caa274371dde593e6c656d304a71;hpb=28fda83cbef0c9c82cd09a343af4e1721085c104;p=jalview.git
diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java
index 2eaae94..f5f271d 100644
--- a/test/jalview/datamodel/AlignmentTest.java
+++ b/test/jalview/datamodel/AlignmentTest.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.datamodel;
import static org.testng.AssertJUnit.assertEquals;
@@ -79,7 +99,7 @@ public class AlignmentTest
* Read in Stockholm format test data including secondary structure
* annotations.
*/
- @BeforeMethod(alwaysRun = true)
+ @BeforeMethod(alwaysRun = true)
public void setUp() throws IOException
{
al = loadAlignment(TEST_DATA, "STH");
@@ -94,7 +114,7 @@ public class AlignmentTest
/**
* Test method that returns annotations that match on calcId.
*/
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testFindAnnotation_byCalcId()
{
Iterable anns = al
@@ -106,7 +126,7 @@ public class AlignmentTest
assertFalse(iter.hasNext());
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testDeleteAllAnnotations_includingAutocalculated()
{
AlignmentAnnotation aa = new AlignmentAnnotation("Consensus",
@@ -120,7 +140,7 @@ public class AlignmentTest
assertEquals("Not all deleted", 0, al.getAlignmentAnnotation().length);
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testDeleteAllAnnotations_excludingAutocalculated()
{
AlignmentAnnotation aa = new AlignmentAnnotation("Consensus",
@@ -144,7 +164,7 @@ public class AlignmentTest
*
* @throws IOException
*/
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testAlignAs_dnaAsDna() throws IOException
{
// aligned cDNA:
@@ -157,9 +177,7 @@ public class AlignmentTest
* of what would normally be protein here.
*/
AlignedCodonFrame acf = new AlignedCodonFrame();
- MapList ml = new MapList(new int[]
- { 1, 12 }, new int[]
- { 1, 12 }, 1, 1);
+ MapList ml = new MapList(new int[] { 1, 12 }, new int[] { 1, 12 }, 1, 1);
acf.addMap(al2.getSequenceAt(0), al1.getSequenceAt(0), ml);
acf.addMap(al2.getSequenceAt(1), al1.getSequenceAt(1), ml);
al1.addCodonFrame(acf);
@@ -176,16 +194,14 @@ public class AlignmentTest
*
* @throws IOException
*/
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testAlignAs_proteinAsCdna() throws IOException
{
// see also AlignmentUtilsTests
AlignmentI al1 = loadAlignment(CDNA_SEQS_1, "FASTA");
AlignmentI al2 = loadAlignment(AA_SEQS_1, "FASTA");
AlignedCodonFrame acf = new AlignedCodonFrame();
- MapList ml = new MapList(new int[]
- { 1, 12 }, new int[]
- { 1, 4 }, 3, 1);
+ MapList ml = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, 1);
acf.addMap(al1.getSequenceAt(0), al2.getSequenceAt(0), ml);
acf.addMap(al1.getSequenceAt(1), al2.getSequenceAt(1), ml);
al2.addCodonFrame(acf);
@@ -200,7 +216,7 @@ public class AlignmentTest
*
* @throws IOException
*/
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testAlignAs_cdnaAsProtein() throws IOException
{
/*
@@ -209,9 +225,7 @@ public class AlignmentTest
AlignmentI al1 = loadAlignment(CDNA_SEQS_1, "FASTA");
AlignmentI al2 = loadAlignment(AA_SEQS_1, "FASTA");
AlignedCodonFrame acf = new AlignedCodonFrame();
- MapList ml = new MapList(new int[]
- { 1, 12 }, new int[]
- { 1, 4 }, 3, 1);
+ MapList ml = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, 1);
acf.addMap(al1.getSequenceAt(0), al2.getSequenceAt(0), ml);
acf.addMap(al1.getSequenceAt(1), al2.getSequenceAt(1), ml);
al2.addCodonFrame(acf);
@@ -232,7 +246,7 @@ public class AlignmentTest
*
* @throws IOException
*/
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testAlignAs_dnaAsProtein_withIntrons() throws IOException
{
/*
@@ -247,13 +261,11 @@ public class AlignmentTest
AlignedCodonFrame acf = new AlignedCodonFrame();
// Seq1 has intron at dna positions 3,4,9 so splice is AAG GCC TTT
// Seq2 has intron at dna positions 1,5,6 so splice is CCG TTT AAA
- MapList ml1 = new MapList(new int[]
- { 1, 2, 5, 8, 10, 12 }, new int[]
- { 1, 3 }, 3, 1);
+ MapList ml1 = new MapList(new int[] { 1, 2, 5, 8, 10, 12 }, new int[] {
+ 1, 3 }, 3, 1);
acf.addMap(al1.getSequenceAt(0), al2.getSequenceAt(0), ml1);
- MapList ml2 = new MapList(new int[]
- { 2, 4, 7, 12 }, new int[]
- { 1, 3 }, 3, 1);
+ MapList ml2 = new MapList(new int[] { 2, 4, 7, 12 },
+ new int[] { 1, 3 }, 3, 1);
acf.addMap(al1.getSequenceAt(1), al2.getSequenceAt(1), ml2);
al2.addCodonFrame(acf);