JAL-3397 impl.IntervalStore and nonc.IntervalStore unified api
[jalview.git] / test / jalview / datamodel / features / FeatureStoreJSTest.java
index ac80298..489ac38 100644 (file)
@@ -21,7 +21,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testFindFeatures_nonNested()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     fs.addFeature(new SequenceFeature("", "", 10, 20, Float.NaN,
             null));
     // same range different description
@@ -49,15 +49,15 @@ public class FeatureStoreJSTest
     assertEquals(overlaps.get(0).getEnd(), 35);
   }
 
-  private FeatureStoreI newFeatureStore()
+  private FeatureStore newFeatureStore()
   {
-    return new FeatureStoreJS(intervalStoreOption);
+    return new FeatureStore(intervalStoreOption);
   }
 
   @Test(groups = "Functional")
   public void testFindFeatures_nested()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     SequenceFeature sf1 = addFeature(fs, 10, 50);
     SequenceFeature sf2 = addFeature(fs, 10, 40);
     SequenceFeature sf3 = addFeature(fs, 20, 30);
@@ -95,7 +95,7 @@ public class FeatureStoreJSTest
 
   private void testFind()
   {
-    FeatureStoreI fs1 = newFeatureStore();
+    FeatureStore fs1 = newFeatureStore();
 
     SequenceFeature sf = addFeature(fs1, 1, 3000);
 
@@ -128,7 +128,7 @@ public class FeatureStoreJSTest
   {
     testFind();
 
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     SequenceFeature sf1 = addFeature(fs, 10, 50);
     SequenceFeature sf2 = addFeature(fs, 1, 15);
     SequenceFeature sf3 = addFeature(fs, 20, 30);
@@ -174,7 +174,7 @@ public class FeatureStoreJSTest
    * @param to
    * @return
    */
-  SequenceFeature addFeature(FeatureStoreI fs, int from, int to)
+  SequenceFeature addFeature(FeatureStore fs, int from, int to)
   {
     SequenceFeature sf1 = new SequenceFeature("", "", from, to, Float.NaN,
             null);
@@ -185,7 +185,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testFindFeatures_contactFeatures()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
 
     SequenceFeature sf = new SequenceFeature("disulphide bond", "bond", 10,
             20, Float.NaN, null);
@@ -228,7 +228,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testGetPositionalFeatures()
   {
-    FeatureStoreI store = newFeatureStore();
+    FeatureStore store = newFeatureStore();
     SequenceFeature sf1 = new SequenceFeature("Metal", "desc", 10, 20,
             Float.NaN, null);
     store.addFeature(sf1);
@@ -275,7 +275,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testDelete()
   {
-    FeatureStoreI store = newFeatureStore();
+    FeatureStore store = newFeatureStore();
     SequenceFeature sf1 = addFeature(store, 10, 20);
     assertTrue(store.getPositionalFeatures().contains(sf1));
 
@@ -347,7 +347,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testAddFeature()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
 
     SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20,
             Float.NaN, null);
@@ -398,7 +398,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testIsEmpty()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     assertTrue(fs.isEmpty());
     assertEquals(fs.getFeatureCount(true), 0);
 
@@ -464,7 +464,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testGetFeatureGroups()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     assertTrue(fs.getFeatureGroups(true).isEmpty());
     assertTrue(fs.getFeatureGroups(false).isEmpty());
 
@@ -531,7 +531,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testGetTotalFeatureLength()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     assertEquals(fs.getTotalFeatureLength(), 0);
 
     addFeature(fs, 10, 20); // 11
@@ -607,7 +607,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testGetMinimumScore_getMaximumScore()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     assertEquals(fs.getMinimumScore(true), Float.NaN); // positional
     assertEquals(fs.getMaximumScore(true), Float.NaN);
     assertEquals(fs.getMinimumScore(false), Float.NaN); // non-positional
@@ -679,7 +679,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testListContains()
   {
-    FeatureStoreI featureStore = newFeatureStore();
+    FeatureStore featureStore = newFeatureStore();
     assertFalse(featureStore.listContains(null, null));
     List<SequenceFeature> features = new ArrayList<>();
     assertFalse(featureStore.listContains(features, null));
@@ -703,7 +703,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testGetFeaturesForGroup()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
 
     /*
      * with no features
@@ -761,7 +761,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testShiftFeatures()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     assertFalse(fs.shiftFeatures(0, 1)); // nothing to do
 
     SequenceFeature sf1 = new SequenceFeature("Cath", "", 2, 5, 0f, null);
@@ -848,7 +848,7 @@ public class FeatureStoreJSTest
     /*
      * add a feature and a nested feature
      */
-    FeatureStoreI store = newFeatureStore();
+    FeatureStore store = newFeatureStore();
     SequenceFeature sf1 = addFeature(store, 10, 20);
     // sf2 is nested in sf1 so will be stored in nestedFeatures
     SequenceFeature sf2 = addFeature(store, 12, 14);
@@ -879,7 +879,7 @@ public class FeatureStoreJSTest
   @Test(groups = "Functional")
   public void testContains()
   {
-    FeatureStoreI fs = newFeatureStore();
+    FeatureStore fs = newFeatureStore();
     SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20,
             Float.NaN, "group1");
     SequenceFeature sf2 = new SequenceFeature("Cath", "", 10, 20,