JAL-3285 fix errors in tests introduced by merge
authortva <tva@10.205.251.175>
Fri, 7 Jun 2019 08:13:08 +0000 (09:13 +0100)
committertva <tva@10.205.251.175>
Fri, 7 Jun 2019 08:13:08 +0000 (09:13 +0100)
test/jalview/datamodel/SequenceGroupTest.java
test/jalview/gui/AlignViewportTest.java
test/jalview/io/JSONFileTest.java
test/jalview/project/Jalview2xmlTests.java

index 2a66996..e0f4eba 100644 (file)
@@ -16,7 +16,6 @@ import jalview.schemes.PIDColourScheme;
 import java.awt.Color;
 import java.util.ArrayList;
 import java.util.Collections;
-
 import java.util.List;
 
 import org.testng.annotations.Test;
@@ -278,7 +277,7 @@ public class SequenceGroupTest
     assertEquals(sg2.thresholdTextColour, sg.thresholdTextColour);
     assertEquals(sg2.textColour, sg.textColour);
     assertEquals(sg2.textColour2, sg.textColour2);
-    assertEquals(sg2.isIgnoreGapsConsensus(), sg.isIgnoreGapsConsensus());
+    assertEquals(sg2.getIgnoreGapsConsensus(), sg.getIgnoreGapsConsensus());
     assertEquals(sg2.isShowSequenceLogo(), sg.isShowSequenceLogo());
     assertEquals(sg2.isNormaliseSequenceLogo(),
             sg.isNormaliseSequenceLogo());
@@ -310,7 +309,7 @@ public class SequenceGroupTest
   {
     SequenceI s1 = new Sequence("abcde", "fg");
     SequenceI s2 = new Sequence("foo", "bar");
-    List<SequenceI> seqs = new ArrayList<SequenceI>();
+    List<SequenceI> seqs = new ArrayList<>();
     seqs.add(s1);
     seqs.add(s2);
     SequenceGroup sg = new SequenceGroup(seqs);
index 06cd44e..977e901 100644 (file)
@@ -429,7 +429,8 @@ public class AlignViewportTest
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     AlignViewportI av = af.getViewport();
-    Assert.assertNull(av.getOccupancyAnnotation(), "Preference did not disable occupancy row.");
+    Assert.assertNull(av.getAlignmentGapAnnotation(),
+            "Preference did not disable occupancy row.");
     int c = 0;
     for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
             null, "Occupancy"))
@@ -443,10 +444,11 @@ public class AlignViewportTest
     af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     av = af.getViewport();
-    Assert.assertNotNull(av.getOccupancyAnnotation(), "Preference did not enable occupancy row.");
+    Assert.assertNotNull(av.getAlignmentGapAnnotation(),
+            "Preference did not enable occupancy row.");
     c = 0;
     for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
-            null, av.getOccupancyAnnotation().label))
+            null, av.getAlignmentGapAnnotation().label))
     {
       c++;
     }
index 4cd5b54..5e835bf 100644 (file)
@@ -494,8 +494,8 @@ public class JSONFileTest
             + actualGrp.getColourText());
     System.out.println(expectedGrp.getDisplayBoxes() + " | "
             + actualGrp.getDisplayBoxes());
-    System.out.println(expectedGrp.isIgnoreGapsConsensus() + " | "
-            + actualGrp.isIgnoreGapsConsensus());
+    System.out.println(expectedGrp.getIgnoreGapsConsensus() + " | "
+            + actualGrp.getIgnoreGapsConsensus());
     System.out.println(expectedGrp.getSequences().size() + " | "
             + actualGrp.getSequences().size());
     System.out.println(expectedGrp.getStartRes() + " | "
@@ -512,8 +512,8 @@ public class JSONFileTest
     if (expectedGrp.getName().equals(actualGrp.getName())
             && expectedGrp.getColourText() == actualGrp.getColourText()
             && expectedGrp.getDisplayBoxes() == actualGrp.getDisplayBoxes()
-            && expectedGrp.isIgnoreGapsConsensus() == actualGrp
-                    .isIgnoreGapsConsensus()
+            && expectedGrp.getIgnoreGapsConsensus() == actualGrp
+                    .getIgnoreGapsConsensus()
             && colourSchemeMatches
             && expectedGrp.getSequences().size() == actualGrp
                     .getSequences().size()
index 6b14282..dfd771a 100644 (file)
@@ -150,7 +150,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
             DataSourceType.FILE);
     assertNotNull(af, "Didn't read input file " + inFile);
     af.loadJalviewDataFile(inAnnot, DataSourceType.FILE, null, null);
-    AlignViewport viewport = af.getViewport();
+    AlignViewportI viewport = af.getViewport();
     assertSame(viewport.getGlobalColourScheme().getClass(),
             TCoffeeColourScheme.class, "Didn't set T-coffee colourscheme");
     assertNotNull(