JAL-2527 Additional test feature/JAL-2527
authorkiramt <k.mourao@dundee.ac.uk>
Fri, 1 Sep 2017 06:37:10 +0000 (07:37 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Fri, 1 Sep 2017 06:37:10 +0000 (07:37 +0100)
test/jalview/renderer/OverviewResColourFinderTest.java

index 3d4ca6f..2016087 100644 (file)
@@ -195,6 +195,7 @@ public class OverviewResColourFinderTest
     assertEquals(Color.lightGray, rcf.getResidueColour(false,
             av.getResidueShading(), groups, seq, 2, null));
 
+    // use legacy colouring
     rcf = new OverviewResColourFinder(true, Color.blue, Color.red);
   
     // G in group specified as magenta in Zappo
@@ -208,6 +209,21 @@ public class OverviewResColourFinderTest
     // Gap outside group coloured white
     assertEquals(Color.white, rcf.getResidueColour(false,
             av.getResidueShading(), groups, seq, 2, null));
+
+    // use new colouring
+    rcf = new OverviewResColourFinder(false, Color.blue, Color.red);
+
+    // G in group specified as magenta in Zappo
+    assertEquals(Color.magenta, rcf.getResidueColour(false,
+            av.getResidueShading(), groups, seq, 7, null));
+
+    // Residue outside group coloured white
+    assertEquals(Color.white, rcf.getResidueColour(false,
+            av.getResidueShading(), groups, seq, 0, null));
+
+    // Gap outside group coloured blue
+    assertEquals(Color.blue, rcf.getResidueColour(false,
+            av.getResidueShading(), groups, seq, 2, null));
   }
 
   @Test