X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2FMCview%2FPDBChainTest.java;h=0da72857287001b6e9e10a26f4c6822373f0e53e;hb=refs%2Fheads%2Ffeatures%2FJAL-2094_colourInterface;hp=0406128b77ac74531b26555cae8fbc91a740db5b;hpb=ab4e8d6988969d68d972d308c4159e9b9eb51e84;p=jalview.git diff --git a/test/MCview/PDBChainTest.java b/test/MCview/PDBChainTest.java index 0406128..0da7285 100644 --- a/test/MCview/PDBChainTest.java +++ b/test/MCview/PDBChainTest.java @@ -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); } /**