From 8fbe19697fc4f60d7534899a274fdef9803fb0d7 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 14 Sep 2017 16:55:05 +0100 Subject: [PATCH] JAL-2541 unit test added --- .../jalview/datamodel/features/SequenceFeaturesTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/jalview/datamodel/features/SequenceFeaturesTest.java b/test/jalview/datamodel/features/SequenceFeaturesTest.java index 3f0eb9a..bcc11d7 100644 --- a/test/jalview/datamodel/features/SequenceFeaturesTest.java +++ b/test/jalview/datamodel/features/SequenceFeaturesTest.java @@ -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()); + } } -- 1.7.10.2