From 64144b92481279aa0aaf11ba05febd65f73cfa30 Mon Sep 17 00:00:00 2001 From: tva Date: Fri, 7 Jun 2019 09:13:08 +0100 Subject: [PATCH] JAL-3285 fix errors in tests introduced by merge --- test/jalview/datamodel/SequenceGroupTest.java | 5 ++--- test/jalview/gui/AlignViewportTest.java | 8 +++++--- test/jalview/io/JSONFileTest.java | 8 ++++---- test/jalview/project/Jalview2xmlTests.java | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/test/jalview/datamodel/SequenceGroupTest.java b/test/jalview/datamodel/SequenceGroupTest.java index 2a66996..e0f4eba 100644 --- a/test/jalview/datamodel/SequenceGroupTest.java +++ b/test/jalview/datamodel/SequenceGroupTest.java @@ -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 seqs = new ArrayList(); + List seqs = new ArrayList<>(); seqs.add(s1); seqs.add(s2); SequenceGroup sg = new SequenceGroup(seqs); diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index 06cd44e..977e901 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -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++; } diff --git a/test/jalview/io/JSONFileTest.java b/test/jalview/io/JSONFileTest.java index 4cd5b54..5e835bf 100644 --- a/test/jalview/io/JSONFileTest.java +++ b/test/jalview/io/JSONFileTest.java @@ -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() diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index 6b14282..dfd771a 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -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( -- 1.7.10.2