From 21ff98b0d0e1e2a6b2283090028a3c32273f4aab Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 2 Sep 2015 16:27:56 +0100 Subject: [PATCH] JAL-1264 test made i18n robust --- test/jalview/gui/PopupMenuTest.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/jalview/gui/PopupMenuTest.java b/test/jalview/gui/PopupMenuTest.java index daeb83f..82fcbc8 100644 --- a/test/jalview/gui/PopupMenuTest.java +++ b/test/jalview/gui/PopupMenuTest.java @@ -10,6 +10,7 @@ import jalview.datamodel.Annotation; import jalview.datamodel.SequenceI; import jalview.io.AppletFormatAdapter; import jalview.io.FormatAdapter; +import jalview.util.MessageManager; import java.awt.Component; import java.io.IOException; @@ -130,7 +131,9 @@ public class PopupMenuTest testee.configureReferenceAnnotationsMenu(menu, seqs); assertTrue(menu.isEnabled()); - String expected = "

Add annotations for
JMOL/secondary structure
PBD/Temp

"; + String s = MessageManager.getString("label.add_annotations_for"); + String expected = "

" + + s + "
Jmol/secondary structure
PDB/Temp

"; assertEquals(expected, menu.getToolTipText()); } @@ -151,7 +154,9 @@ public class PopupMenuTest testee.configureReferenceAnnotationsMenu(menu, seqs); assertTrue(menu.isEnabled()); - String expected = "

Add annotations for
JMOL/secondary structure
PBD/Temp

"; + String s = MessageManager.getString("label.add_annotations_for"); + String expected = "

" + + s + "
Jmol/secondary structure
PDB/Temp

"; assertEquals(expected, menu.getToolTipText()); } @@ -169,7 +174,7 @@ public class PopupMenuTest // PDB.secondary structure on Sequence0 AlignmentAnnotation annotation = new AlignmentAnnotation( "secondary structure", "", 0); - annotation.setCalcId("PBD"); + annotation.setCalcId("PDB"); seqs.get(0).getDatasetSequence().addAlignmentAnnotation(annotation); if (addToSequence) { @@ -182,7 +187,7 @@ public class PopupMenuTest // PDB.Temp on Sequence1 annotation = new AlignmentAnnotation("Temp", "", 0); - annotation.setCalcId("PBD"); + annotation.setCalcId("PDB"); seqs.get(1).getDatasetSequence().addAlignmentAnnotation(annotation); if (addToSequence) { @@ -195,7 +200,7 @@ public class PopupMenuTest // JMOL.secondary structure on Sequence0 annotation = new AlignmentAnnotation("secondary structure", "", 0); - annotation.setCalcId("JMOL"); + annotation.setCalcId("Jmol"); seqs.get(0).getDatasetSequence().addAlignmentAnnotation(annotation); if (addToSequence) { -- 1.7.10.2