Merge branch 'develop' into patch/JAL-4281_idwidthandannotHeight_in_project
[jalview.git] / test / jalview / schemes / ColourSchemePropertyTest.java
index 11562b8..ee65819 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
 package jalview.schemes;
 
 import static org.testng.Assert.assertEquals;
@@ -76,52 +96,55 @@ public class ColourSchemePropertyTest
     SequenceI seq = new Sequence("Seq1", "abcd");
     AlignmentI al = new Alignment(new SequenceI[] { seq });
     // the strings here correspond to JalviewColourScheme.toString() values
-    ColourSchemeI cs = ColourSchemeProperty.getColourScheme(al, "Clustal");
+    ColourSchemeI cs = ColourSchemeProperty.getColourScheme(null, al,
+            "Clustal");
     assertTrue(cs instanceof ClustalxColourScheme);
     // not case-sensitive
-    cs = ColourSchemeProperty.getColourScheme(al, "CLUSTAL");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "CLUSTAL");
     assertTrue(cs instanceof ClustalxColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "clustal");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "clustal");
     assertTrue(cs instanceof ClustalxColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Blosum62");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Blosum62");
     assertTrue(cs instanceof Blosum62ColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "% Identity");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "% Identity");
     assertTrue(cs instanceof PIDColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Zappo");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Zappo");
     assertTrue(cs instanceof ZappoColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Taylor");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Taylor");
     assertTrue(cs instanceof TaylorColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Hydrophobic");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Hydrophobic");
     assertTrue(cs instanceof HydrophobicColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Helix Propensity");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Helix Propensity");
     assertTrue(cs instanceof HelixColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Strand Propensity");
+    cs = ColourSchemeProperty.getColourScheme(null, al,
+            "Strand Propensity");
     assertTrue(cs instanceof StrandColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Turn Propensity");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Turn Propensity");
     assertTrue(cs instanceof TurnColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Buried Index");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Buried Index");
     assertTrue(cs instanceof BuriedColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Nucleotide");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "Nucleotide");
     assertTrue(cs instanceof NucleotideColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "Purine/Pyrimidine");
+    cs = ColourSchemeProperty.getColourScheme(null, al,
+            "Purine/Pyrimidine");
     assertTrue(cs instanceof PurinePyrimidineColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "T-Coffee Scores");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "T-Coffee Scores");
     assertTrue(cs instanceof TCoffeeColourScheme);
-    cs = ColourSchemeProperty.getColourScheme(al, "RNA Helices");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "RNA Helices");
     assertTrue(cs instanceof RNAHelicesColour);
     // 'None' is a special value
-    assertNull(ColourSchemeProperty.getColourScheme(al, "None"));
-    assertNull(ColourSchemeProperty.getColourScheme(al, "none"));
+    assertNull(ColourSchemeProperty.getColourScheme(null, al, "None"));
+    assertNull(ColourSchemeProperty.getColourScheme(null, al, "none"));
     // default is to convert the name into a fixed colour
-    cs = ColourSchemeProperty.getColourScheme(al, "elephants");
+    cs = ColourSchemeProperty.getColourScheme(null, al, "elephants");
     assertTrue(cs instanceof UserColourScheme);
 
     /*
      * explicit aa colours
      */
     UserColourScheme ucs = (UserColourScheme) ColourSchemeProperty
-            .getColourScheme(al,
-            "R,G=red;C=blue;c=green;Q=10,20,30;S,T=11ffdd");
+            .getColourScheme(null, al,
+                    "R,G=red;C=blue;c=green;Q=10,20,30;S,T=11ffdd");
     assertEquals(ucs.findColour('H'), Color.white);
     assertEquals(ucs.findColour('R'), Color.red);
     assertEquals(ucs.findColour('r'), Color.red);