1 package jalview.schemes;
3 import static org.testng.Assert.assertEquals;
7 import org.testng.annotations.Test;
9 public class BuriedColourSchemeTest
12 * Turn colours are based on the scores in ResidueProperties.buried A = 1.7, R
13 * = 0.1, N = 0.4, D = 0.4... min = 0.05 max = 4.6
15 * scores are scaled to c 0-1 between min and max and colour is (0, 1-c, c)
17 @Test(groups = "Functional")
18 public void testFindColour()
20 ScoreColourScheme scheme = new BuriedColourScheme();
24 float a = (1.7f - min) / (max - min);
25 assertEquals(scheme.findColour('A', 0, null), new Color(0, 1 - a, a));
27 float d = (0.4f - min) / (max - min);
28 assertEquals(scheme.findColour('D', 0, null), new Color(0, 1 - d, d));
30 assertEquals(scheme.findColour('-', 0, null), Color.WHITE);