JAL-3049 redo (part of) commit 92bc328
[jalview.git] / test / jalview / gui / FeatureSettingsTest.java
index 5219bda..6d8a47e 100644 (file)
@@ -197,20 +197,23 @@ public class FeatureSettingsTest
   @Test(groups = "Functional")
   public void testGetColorTooltip() throws IOException
   {
-    assertNull(FeatureSettings.getColorTooltip(null));
+    assertNull(FeatureSettings.getColorTooltip(null, false));
 
     /*
      * simple colour
      */
     FeatureColourI fc = new FeatureColour(Color.black);
     String simpleTooltip = "Click to edit, right-click for menu";
-    assertEquals(FeatureSettings.getColorTooltip(fc), simpleTooltip);
+    assertEquals(FeatureSettings.getColorTooltip(fc, true), simpleTooltip);
+    assertNull(FeatureSettings.getColorTooltip(fc, false));
 
     /*
      * graduated colour tooltip includes description of colour
      */
     fc.setColourByLabel(true);
-    assertEquals(FeatureSettings.getColorTooltip(fc),
+    assertEquals(FeatureSettings.getColorTooltip(fc, false),
+            "<html>By Label</html>");
+    assertEquals(FeatureSettings.getColorTooltip(fc, true),
             "<html>By Label<br>" + simpleTooltip + "</br></html>");
 
     /*
@@ -219,11 +222,16 @@ public class FeatureSettingsTest
     fc = new FeatureColour(null, Color.red, Color.blue, null, 2f, 10f);
     fc.setBelowThreshold(true);
     fc.setThreshold(4f);
-    assertEquals(FeatureSettings.getColorTooltip(fc),
+    assertEquals(FeatureSettings.getColorTooltip(fc, false),
+            "<html>By Score (&lt; 4.0)</html>");
+    assertEquals(FeatureSettings.getColorTooltip(fc, true),
             "<html>By Score (&lt; 4.0)<br>" + simpleTooltip
                     + "</br></html>");
+
     fc.setAboveThreshold(true);
-    assertEquals(FeatureSettings.getColorTooltip(fc),
+    assertEquals(FeatureSettings.getColorTooltip(fc, false),
+            "<html>By Score (&gt; 4.0)</html>");
+    assertEquals(FeatureSettings.getColorTooltip(fc, true),
             "<html>By Score (&gt; 4.0)<br>" + simpleTooltip
                     + "</br></html>");
   }