X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FPopupMenuTest.java;h=e1f0708f4938cde53ffa6f23d4defc1d14c6e01a;hb=4bba61a3c701f83bdcb6707c4d9f17a1f5faaa04;hp=f7b148264545df889667a849473918777674d7d3;hpb=4935082f08648ab92743e14e5e2dfefa3e0dcd4d;p=jalview.git diff --git a/test/jalview/gui/PopupMenuTest.java b/test/jalview/gui/PopupMenuTest.java index f7b1482..e1f0708 100644 --- a/test/jalview/gui/PopupMenuTest.java +++ b/test/jalview/gui/PopupMenuTest.java @@ -3,12 +3,6 @@ package jalview.gui; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.SequenceI; -import jalview.io.AppletFormatAdapter; -import jalview.io.FormatAdapter; -import jalview.util.MessageManager; import java.awt.Component; import java.io.IOException; @@ -23,6 +17,13 @@ import javax.swing.JSeparator; import org.junit.Before; import org.junit.Test; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Annotation; +import jalview.datamodel.SequenceI; +import jalview.io.AppletFormatAdapter; +import jalview.io.FormatAdapter; + public class PopupMenuTest { // 4 sequences x 13 positions @@ -66,12 +67,9 @@ public class PopupMenuTest List seqs = new ArrayList(); testee.configureReferenceAnnotationsMenu(menu, seqs); assertFalse(menu.isEnabled()); - assertEquals( - MessageManager.getString("label.add_reference_annotations"), - menu.getText()); // now try null list menu.setEnabled(true); - testee.configureReferenceAnnotationsMenu(menu, seqs); + testee.configureReferenceAnnotationsMenu(menu, null); assertFalse(menu.isEnabled()); } @@ -241,28 +239,32 @@ public class PopupMenuTest // PDB.secondary structure on Sequence0 AlignmentAnnotation annotation = new AlignmentAnnotation( - "secondary structure", "", 0); + "secondary structure", "", new Annotation[] + {}); annotation.setCalcId("PDB"); annotation.visible = true; seqs.get(0).addAlignmentAnnotation(annotation); parentPanel.getAlignment().addAnnotation(annotation); // JMOL.secondary structure on Sequence0 - hidden - annotation = new AlignmentAnnotation("secondary structure", "", 0); + annotation = new AlignmentAnnotation("secondary structure", "", new Annotation[] + {}); annotation.setCalcId("JMOL"); annotation.visible = false; seqs.get(0).addAlignmentAnnotation(annotation); parentPanel.getAlignment().addAnnotation(annotation); // Jpred.SSP on Sequence0 - hidden - annotation = new AlignmentAnnotation("SSP", "", 0); + annotation = new AlignmentAnnotation("SSP", "", new Annotation[] + {}); annotation.setCalcId("JPred"); annotation.visible = false; seqs.get(0).addAlignmentAnnotation(annotation); parentPanel.getAlignment().addAnnotation(annotation); // PDB.Temp on Sequence1 - annotation = new AlignmentAnnotation("Temp", "", 0); + annotation = new AlignmentAnnotation("Temp", "", new Annotation[] + {}); annotation.setCalcId("PDB"); annotation.visible = true; seqs.get(1).addAlignmentAnnotation(annotation); @@ -319,14 +321,16 @@ public class PopupMenuTest // PDB.secondary structure on Sequence0 AlignmentAnnotation annotation = new AlignmentAnnotation( - "secondary structure", "", 0); + "secondary structure", "", new Annotation[] + {}); annotation.setCalcId("PDB"); annotation.visible = true; seqs.get(0).addAlignmentAnnotation(annotation); parentPanel.getAlignment().addAnnotation(annotation); // PDB.Temp on Sequence1 - annotation = new AlignmentAnnotation("Temp", "", 0); + annotation = new AlignmentAnnotation("Temp", "", new Annotation[] + {}); annotation.setCalcId("PDB"); annotation.visible = true; seqs.get(1).addAlignmentAnnotation(annotation); @@ -376,14 +380,16 @@ public class PopupMenuTest // PDB.secondary structure on Sequence0 AlignmentAnnotation annotation = new AlignmentAnnotation( - "secondary structure", "", 0); + "secondary structure", "", new Annotation[] + {}); annotation.setCalcId("PDB"); annotation.visible = false; seqs.get(0).addAlignmentAnnotation(annotation); parentPanel.getAlignment().addAnnotation(annotation); // PDB.Temp on Sequence1 - annotation = new AlignmentAnnotation("Temp", "", 0); + annotation = new AlignmentAnnotation("Temp", "", new Annotation[] + {}); annotation.setCalcId("PDB2"); annotation.visible = false; seqs.get(1).addAlignmentAnnotation(annotation);