From 7bbe4d3a4369a952ef5ca086ce5846dd4cad6866 Mon Sep 17 00:00:00 2001 From: kiramt Date: Fri, 1 Sep 2017 07:37:10 +0100 Subject: [PATCH] JAL-2527 Additional test --- test/jalview/renderer/OverviewResColourFinderTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/jalview/renderer/OverviewResColourFinderTest.java b/test/jalview/renderer/OverviewResColourFinderTest.java index 3d4ca6f..2016087 100644 --- a/test/jalview/renderer/OverviewResColourFinderTest.java +++ b/test/jalview/renderer/OverviewResColourFinderTest.java @@ -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 -- 1.7.10.2