JAL-2835 test updated for colour by 'nested attribute'
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 16 Nov 2017 08:18:10 +0000 (08:18 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 16 Nov 2017 08:18:10 +0000 (08:18 +0000)
test/jalview/schemes/FeatureColourTest.java

index db4fe40..6be66d2 100644 (file)
@@ -25,6 +25,7 @@ import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertNull;
 import static org.testng.AssertJUnit.assertTrue;
 import static org.testng.AssertJUnit.fail;
+import static org.testng.internal.junit.ArrayAsserts.assertArrayEquals;
 
 import jalview.datamodel.SequenceFeature;
 import jalview.gui.JvOptionPane;
@@ -33,11 +34,11 @@ import jalview.util.Format;
 
 import java.awt.Color;
 
-import junit.extensions.PA;
-
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class FeatureColourTest
 {
 
@@ -121,7 +122,7 @@ public class FeatureColourTest
     assertTrue(fc1.isColourByLabel());
     assertFalse(fc1.isGraduatedColour());
     assertTrue(fc1.isColourByAttribute());
-    assertEquals("AF", fc1.getAttributeName());
+    assertArrayEquals(new String[] { "AF" }, fc1.getAttributeName());
 
     /*
      * colour by attribute (value)
@@ -134,7 +135,7 @@ public class FeatureColourTest
     assertTrue(fc1.isGraduatedColour());
     assertFalse(fc1.isColourByLabel());
     assertTrue(fc1.isColourByAttribute());
-    assertEquals("AF", fc1.getAttributeName());
+    assertArrayEquals(new String[] { "AF" }, fc1.getAttributeName());
     assertTrue(fc1.isAboveThreshold());
     assertEquals(12f, fc1.getThreshold());
     assertEquals(Color.gray, fc1.getMinColour());
@@ -190,7 +191,7 @@ public class FeatureColourTest
     assertTrue(fc1.isGraduatedColour());
     assertFalse(fc1.isColourByLabel());
     assertTrue(fc1.isColourByAttribute());
-    assertEquals("AF", fc1.getAttributeName());
+    assertEquals(new String[] { "AF" }, fc1.getAttributeName());
     assertEquals(13f, fc1.getMin());
     assertEquals(36f, fc1.getMax());
     assertFalse((boolean) PA.getValue(fc1, "isHighToLow"));