Clover icon

Coverage Report

  1. Project Clover database Mon Nov 11 2024 17:27:16 GMT
  2. Package jalview.schemes

File JalviewColourSchemeTest.java

 

Code metrics

0
30
2
1
86
62
2
0.07
15
2
1

Classes

Class Line # Actions
JalviewColourSchemeTest 28 30 2
1.0100%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
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.
11    *
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.
16    *
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.
20    */
21    package jalview.schemes;
22   
23    import static org.testng.Assert.assertEquals;
24    import static org.testng.Assert.assertTrue;
25   
26    import org.testng.annotations.Test;
27   
 
28    public class JalviewColourSchemeTest
29    {
 
30  1 toggle @Test(groups = "Functional")
31    public void testGetSchemeClass()
32    {
33  1 assertTrue(JalviewColourScheme.Clustal
34    .getSchemeClass() == ClustalxColourScheme.class);
35  1 assertTrue(JalviewColourScheme.Blosum62
36    .getSchemeClass() == Blosum62ColourScheme.class);
37  1 assertTrue(JalviewColourScheme.PID
38    .getSchemeClass() == PIDColourScheme.class);
39  1 assertTrue(JalviewColourScheme.Hydrophobic
40    .getSchemeClass() == HydrophobicColourScheme.class);
41  1 assertTrue(JalviewColourScheme.Zappo
42    .getSchemeClass() == ZappoColourScheme.class);
43  1 assertTrue(JalviewColourScheme.Taylor
44    .getSchemeClass() == TaylorColourScheme.class);
45  1 assertTrue(JalviewColourScheme.Helix
46    .getSchemeClass() == HelixColourScheme.class);
47  1 assertTrue(JalviewColourScheme.Strand
48    .getSchemeClass() == StrandColourScheme.class);
49  1 assertTrue(JalviewColourScheme.Turn
50    .getSchemeClass() == TurnColourScheme.class);
51  1 assertTrue(JalviewColourScheme.Buried
52    .getSchemeClass() == BuriedColourScheme.class);
53  1 assertTrue(JalviewColourScheme.Nucleotide
54    .getSchemeClass() == NucleotideColourScheme.class);
55  1 assertTrue(JalviewColourScheme.PurinePyrimidine
56    .getSchemeClass() == PurinePyrimidineColourScheme.class);
57  1 assertTrue(JalviewColourScheme.TCoffee
58    .getSchemeClass() == TCoffeeColourScheme.class);
59  1 assertTrue(JalviewColourScheme.RNAHelices
60    .getSchemeClass() == RNAHelicesColour.class);
61  1 assertTrue(JalviewColourScheme.IdColour
62    .getSchemeClass() == IdColourScheme.class);
63    }
64   
 
65  1 toggle @Test(groups = "Functional")
66    public void testToString()
67    {
68  1 assertEquals(JalviewColourScheme.Clustal.toString(), "Clustal");
69  1 assertEquals(JalviewColourScheme.Blosum62.toString(), "Blosum62");
70  1 assertEquals(JalviewColourScheme.PID.toString(), "% Identity");
71  1 assertEquals(JalviewColourScheme.Zappo.toString(), "Zappo");
72  1 assertEquals(JalviewColourScheme.Taylor.toString(), "Taylor");
73  1 assertEquals(JalviewColourScheme.Hydrophobic.toString(), "Hydrophobic");
74  1 assertEquals(JalviewColourScheme.Helix.toString(), "Helix Propensity");
75  1 assertEquals(JalviewColourScheme.Strand.toString(),
76    "Strand Propensity");
77  1 assertEquals(JalviewColourScheme.Turn.toString(), "Turn Propensity");
78  1 assertEquals(JalviewColourScheme.Buried.toString(), "Buried Index");
79  1 assertEquals(JalviewColourScheme.Nucleotide.toString(), "Nucleotide");
80  1 assertEquals(JalviewColourScheme.PurinePyrimidine.toString(),
81    "Purine/Pyrimidine");
82  1 assertEquals(JalviewColourScheme.TCoffee.toString(), "T-Coffee Scores");
83  1 assertEquals(JalviewColourScheme.RNAHelices.toString(), "RNA Helices");
84  1 assertEquals(JalviewColourScheme.IdColour.toString(), "Sequence ID");
85    }
86    }