2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.schemes;
23 import static org.testng.Assert.assertEquals;
24 import static org.testng.Assert.assertTrue;
26 import org.testng.annotations.Test;
28 public class JalviewColourSchemeTest
30 @Test(groups = "Functional")
31 public void testGetSchemeClass()
33 assertTrue(JalviewColourScheme.Clustal
34 .getSchemeClass() == ClustalxColourScheme.class);
35 assertTrue(JalviewColourScheme.Blosum62
36 .getSchemeClass() == Blosum62ColourScheme.class);
37 assertTrue(JalviewColourScheme.PID
38 .getSchemeClass() == PIDColourScheme.class);
39 assertTrue(JalviewColourScheme.Hydrophobic
40 .getSchemeClass() == HydrophobicColourScheme.class);
41 assertTrue(JalviewColourScheme.Zappo
42 .getSchemeClass() == ZappoColourScheme.class);
43 assertTrue(JalviewColourScheme.Taylor
44 .getSchemeClass() == TaylorColourScheme.class);
45 assertTrue(JalviewColourScheme.Helix
46 .getSchemeClass() == HelixColourScheme.class);
47 assertTrue(JalviewColourScheme.Strand
48 .getSchemeClass() == StrandColourScheme.class);
49 assertTrue(JalviewColourScheme.Turn
50 .getSchemeClass() == TurnColourScheme.class);
51 assertTrue(JalviewColourScheme.Buried
52 .getSchemeClass() == BuriedColourScheme.class);
53 assertTrue(JalviewColourScheme.Nucleotide
54 .getSchemeClass() == NucleotideColourScheme.class);
55 assertTrue(JalviewColourScheme.PurinePyrimidine
56 .getSchemeClass() == PurinePyrimidineColourScheme.class);
57 assertTrue(JalviewColourScheme.TCoffee
58 .getSchemeClass() == TCoffeeColourScheme.class);
59 assertTrue(JalviewColourScheme.RNAHelices
60 .getSchemeClass() == RNAHelicesColour.class);
61 assertTrue(JalviewColourScheme.IdColour
62 .getSchemeClass() == IdColourScheme.class);
65 @Test(groups = "Functional")
66 public void testToString()
68 assertEquals(JalviewColourScheme.Clustal.toString(), "Clustal");
69 assertEquals(JalviewColourScheme.Blosum62.toString(), "Blosum62");
70 assertEquals(JalviewColourScheme.PID.toString(), "% Identity");
71 assertEquals(JalviewColourScheme.Zappo.toString(), "Zappo");
72 assertEquals(JalviewColourScheme.Taylor.toString(), "Taylor");
73 assertEquals(JalviewColourScheme.Hydrophobic.toString(), "Hydrophobic");
74 assertEquals(JalviewColourScheme.Helix.toString(), "Helix Propensity");
75 assertEquals(JalviewColourScheme.Strand.toString(),
77 assertEquals(JalviewColourScheme.Turn.toString(), "Turn Propensity");
78 assertEquals(JalviewColourScheme.Buried.toString(), "Buried Index");
79 assertEquals(JalviewColourScheme.Nucleotide.toString(), "Nucleotide");
80 assertEquals(JalviewColourScheme.PurinePyrimidine.toString(),
82 assertEquals(JalviewColourScheme.TCoffee.toString(), "T-Coffee Scores");
83 assertEquals(JalviewColourScheme.RNAHelices.toString(), "RNA Helices");
84 assertEquals(JalviewColourScheme.IdColour.toString(), "Sequence ID");