import jalview.gui.JvOptionPane;
+import java.awt.Color;
+
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+ "ms");
assertTrue(elapsed2 > elapsed1);
}
+
+ @Test(groups = "Functional")
+ public void testGetHexString()
+ {
+ /*
+ * r = 13 = d base 16, gets padded to 0d
+ * g = 103 = (16x6) + 7 = 67 base 16
+ * b = 219 = (16x13) + 11 = db base 16
+ */
+ Color c = new Color(13, 103, 219);
+ assertEquals(Format.getHexString(c), "0d67db");
+
+ assertEquals(Format.getHexString(Color.black), "000000");
+
+ assertEquals(Format.getHexString(Color.white), "ffffff");
+ }
}