JAL-1264 test made i18n robust
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 2 Sep 2015 15:27:56 +0000 (16:27 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 2 Sep 2015 15:27:56 +0000 (16:27 +0100)
test/jalview/gui/PopupMenuTest.java

index daeb83f..82fcbc8 100644 (file)
@@ -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 = "<html><style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</p></html>";
+    String s = MessageManager.getString("label.add_annotations_for");
+    String expected = "<html><style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">"
+            + s + "<br/>Jmol/secondary structure<br/>PDB/Temp</p></html>";
     assertEquals(expected, menu.getToolTipText());
   }
 
@@ -151,7 +154,9 @@ public class PopupMenuTest
 
     testee.configureReferenceAnnotationsMenu(menu, seqs);
     assertTrue(menu.isEnabled());
-    String expected = "<html><style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</p></html>";
+    String s = MessageManager.getString("label.add_annotations_for");
+    String expected = "<html><style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">"
+            + s + "<br/>Jmol/secondary structure<br/>PDB/Temp</p></html>";
     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)
     {