assertTrue((boolean) PA.getValue(fc1, "isHighToLow"));
/*
+ * graduated colour by attribute
+ */
+ fc1.setAttributeName("AF");
+ fc1 = new FeatureColour(fc1, 13f, 36f);
+ assertTrue(fc1.isGraduatedColour());
+ assertFalse(fc1.isColourByLabel());
+ assertTrue(fc1.isColourByAttribute());
+ assertEquals("AF", fc1.getAttributeName());
+ assertEquals(13f, fc1.getMin());
+ assertEquals(36f, fc1.getMax());
+ assertFalse((boolean) PA.getValue(fc1, "isHighToLow"));
+
+ /*
* colour by label
*/
fc = new FeatureColour(Color.BLUE, Color.RED, 1f, 5f);
assertEquals(5f, fc.getMax());
/*
- * update min-max bounds - converts to graduated colour
+ * update min-max bounds
*/
fc1 = new FeatureColour(fc, 2f, 6f);
- assertTrue(fc1.isGraduatedColour());
- assertFalse(fc1.isColourByLabel());
+ assertFalse(fc1.isGraduatedColour());
+ assertTrue(fc1.isColourByLabel());
assertFalse(fc1.isColourByAttribute());
assertNull(fc1.getAttributeName());
assertEquals(2f, fc1.getMin());
assertEquals(6f, fc1.getMax());
+
+ /*
+ * colour by attribute text
+ */
+ fc1.setAttributeName("AC");
+ fc1 = new FeatureColour(fc1, 13f, 36f);
+ assertFalse(fc1.isGraduatedColour());
+ assertTrue(fc1.isColourByLabel());
+ assertTrue(fc1.isColourByAttribute());
+ assertEquals("AC", fc1.getAttributeName());
+ assertEquals(13f, fc1.getMin());
+ assertEquals(36f, fc1.getMax());
}
@Test(groups = { "Functional" })