JAL-2541 unit test added
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 14 Sep 2017 15:55:05 +0000 (16:55 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 14 Sep 2017 15:55:05 +0000 (16:55 +0100)
test/jalview/datamodel/features/SequenceFeaturesTest.java

index 3f0eb9a..bcc11d7 100644 (file)
@@ -1247,4 +1247,18 @@ public class SequenceFeaturesTest
     assertTrue(store.isOntologyTerm("junk", new String[] {}));
     assertTrue(store.isOntologyTerm("junk", (String[]) null));
   }
+
+  @Test(groups = "Functional")
+  public void testDeleteAll()
+  {
+    SequenceFeaturesI store = new SequenceFeatures();
+    assertFalse(store.hasFeatures());
+    store.deleteAll();
+    assertFalse(store.hasFeatures());
+    store.add(new SequenceFeature("Cath", "Desc", 12, 20, 0f, "Group"));
+    store.add(new SequenceFeature("Pfam", "Desc", 6, 12, 2f, "Group2"));
+    assertTrue(store.hasFeatures());
+    store.deleteAll();
+    assertFalse(store.hasFeatures());
+  }
 }