Merge branch 'develop' into features/JAL-2094_colourInterface
[jalview.git] / test / MCview / PDBChainTest.java
index 0406128..0da7285 100644 (file)
@@ -26,10 +26,12 @@ import static org.testng.AssertJUnit.assertSame;
 import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.analysis.AlignSeq;
+import jalview.api.ColorI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
+import jalview.schemes.Colour;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.TaylorColourScheme;
 import jalview.structure.StructureImportSettings;
@@ -138,10 +140,10 @@ public class PDBChainTest
     c.makeBond(a2, a3);
     c.setChainColours(Color.PINK);
     assertEquals(2, c.bonds.size());
-    assertEquals(Color.PINK, c.bonds.get(0).startCol);
-    assertEquals(Color.PINK, c.bonds.get(0).endCol);
-    assertEquals(Color.PINK, c.bonds.get(1).startCol);
-    assertEquals(Color.PINK, c.bonds.get(1).endCol);
+    assertEquals(Colour.pink, c.bonds.get(0).startCol);
+    assertEquals(Colour.pink, c.bonds.get(0).endCol);
+    assertEquals(Colour.pink, c.bonds.get(1).startCol);
+    assertEquals(Colour.pink, c.bonds.get(1).endCol);
   }
 
   /**
@@ -151,8 +153,8 @@ public class PDBChainTest
   @Test(groups = { "Functional" })
   public void testSetChainColours_colourScheme()
   {
-    Color alaColour = new Color(204, 255, 0);
-    Color glyColour = new Color(255, 153, 0);
+    ColorI alaColour = new Colour(204, 255, 0);
+    ColorI glyColour = new Colour(255, 153, 0);
     a1.resName = "ALA";
     a2.resName = "GLY";
     a3.resName = "XXX"; // no colour defined
@@ -172,20 +174,20 @@ public class PDBChainTest
     // bond a2 to a3 - no colour found for a3
     // exception handling defaults to gray
     b = c.bonds.get(2);
-    assertEquals(Color.gray, b.startCol);
-    assertEquals(Color.gray, b.endCol);
+    assertEquals(Colour.gray, b.startCol);
+    assertEquals(Colour.gray, b.endCol);
   }
 
   @Test(groups = { "Functional" })
   public void testGetChargeColour()
   {
-    assertEquals(Color.red, PDBChain.getChargeColour("ASP"));
-    assertEquals(Color.red, PDBChain.getChargeColour("GLU"));
-    assertEquals(Color.blue, PDBChain.getChargeColour("LYS"));
-    assertEquals(Color.blue, PDBChain.getChargeColour("ARG"));
-    assertEquals(Color.yellow, PDBChain.getChargeColour("CYS"));
-    assertEquals(Color.lightGray, PDBChain.getChargeColour("ALA"));
-    assertEquals(Color.lightGray, PDBChain.getChargeColour(null));
+    assertEquals(Colour.red, PDBChain.getChargeColour("ASP"));
+    assertEquals(Colour.red, PDBChain.getChargeColour("GLU"));
+    assertEquals(Colour.blue, PDBChain.getChargeColour("LYS"));
+    assertEquals(Colour.blue, PDBChain.getChargeColour("ARG"));
+    assertEquals(Colour.yellow, PDBChain.getChargeColour("CYS"));
+    assertEquals(Colour.lightGray, PDBChain.getChargeColour("ALA"));
+    assertEquals(Colour.lightGray, PDBChain.getChargeColour(null));
   }
 
   /**
@@ -205,16 +207,16 @@ public class PDBChainTest
     assertEquals(3, c.bonds.size());
     // bond a1 to a2
     Bond b = c.bonds.get(0);
-    assertEquals(Color.red, b.startCol);
-    assertEquals(Color.blue, b.endCol);
+    assertEquals(Colour.red, b.startCol);
+    assertEquals(Colour.blue, b.endCol);
     // bond a2 to a3
     b = c.bonds.get(1);
-    assertEquals(Color.blue, b.startCol);
-    assertEquals(Color.yellow, b.endCol);
+    assertEquals(Colour.blue, b.startCol);
+    assertEquals(Colour.yellow, b.endCol);
     // bond a3 to a4
     b = c.bonds.get(2);
-    assertEquals(Color.yellow, b.startCol);
-    assertEquals(Color.lightGray, b.endCol);
+    assertEquals(Colour.yellow, b.startCol);
+    assertEquals(Colour.lightGray, b.endCol);
   }
 
   /**