From ff471e9978e2c6ca49f4395184fb8156488de460 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 16 Nov 2017 08:18:10 +0000 Subject: [PATCH] JAL-2835 test updated for colour by 'nested attribute' --- test/jalview/schemes/FeatureColourTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/jalview/schemes/FeatureColourTest.java b/test/jalview/schemes/FeatureColourTest.java index db4fe40..6be66d2 100644 --- a/test/jalview/schemes/FeatureColourTest.java +++ b/test/jalview/schemes/FeatureColourTest.java @@ -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")); -- 1.7.10.2