import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotEquals;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
}
@Test(groups = "Functional")
+ public void testFindFeatureAtEnd()
+ {
+ /*
+ * terminal residue feature
+ */
+ seq.addSequenceFeature(new SequenceFeature("PDBRESNUM", "pdb res 1",
+ seq.getEnd(), seq.getEnd(), Float.NaN, "1seq.pdb"));
+ fr.setColour("PDBRESNUM", new FeatureColour(Color.red));
+ fr.featuresAdded();
+ av.setShowSequenceFeatures(true);
+
+ /*
+ * final column should have PDBRESNUM feature, the others not
+ */
+ Color c = finder.findFeatureColour(Color.blue, seq,
+ seq.getLength() - 2);
+ assertNotEquals(c, Color.red);
+ c = finder.findFeatureColour(Color.blue, seq, seq.getLength() - 1);
+ assertEquals(c, Color.red);
+ }
+
+ @Test(groups = "Functional")
public void testFindFeatureColour_graduatedFeatureColour()
{
seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 2,