JAL-2481 a smidgin more test coverage of findFeatures
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 23 Aug 2017 10:48:20 +0000 (11:48 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 23 Aug 2017 10:48:20 +0000 (11:48 +0100)
test/jalview/datamodel/SequenceTest.java

index 2f824ca..6844072 100644 (file)
@@ -1358,6 +1358,10 @@ public class SequenceTest
     SequenceFeature sfContactFG = new SequenceFeature("Disulfide Bond",
             "desc", 13, 14, 2f, null);
     sq.addSequenceFeature(sfContactFG);
+    // add single position feature at [I]
+    SequenceFeature sfI = new SequenceFeature("Disulfide Bond",
+            "desc", 16, 16, null);
+    sq.addSequenceFeature(sfI);
 
     // no features in columns 1-2 (-A)
     List<SequenceFeature> found = sq.findFeatures(1, 2);
@@ -1384,6 +1388,11 @@ public class SequenceTest
     // columns 10-11 (--) should find nothing
     found = sq.findFeatures(10, 11);
     assertEquals(0, found.size());
+
+    // columns 14-14 (I) should find variant feature
+    found = sq.findFeatures(14, 14);
+    assertEquals(1, found.size());
+    assertTrue(found.contains(sfI));
   }
 
   @Test(groups = { "Functional" })