From 9d15a20b1f34c76427da5ec9274ff97a1ca49393 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 16 Dec 2016 08:55:13 +0000 Subject: [PATCH] JAL-1354 use i18n text for expected value --- test/jalview/gui/PopupMenuTest.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/jalview/gui/PopupMenuTest.java b/test/jalview/gui/PopupMenuTest.java index 922d457..335240b 100644 --- a/test/jalview/gui/PopupMenuTest.java +++ b/test/jalview/gui/PopupMenuTest.java @@ -321,7 +321,8 @@ public class PopupMenuTest assertEquals(4, showOptions.length); // includes 'All' and separator assertEquals(4, hideOptions.length); - assertEquals("All", ((JMenuItem) showOptions[0]).getText()); + String all = MessageManager.getString("label.all"); + assertEquals(all, ((JMenuItem) showOptions[0]).getText()); assertTrue(showOptions[1] instanceof JPopupMenu.Separator); assertEquals(JSeparator.HORIZONTAL, ((JSeparator) showOptions[1]).getOrientation()); @@ -331,7 +332,7 @@ public class PopupMenuTest assertEquals("SSP", ((JMenuItem) showOptions[3]).getText()); assertEquals("JPred", ((JMenuItem) showOptions[3]).getToolTipText()); - assertEquals("All", ((JMenuItem) hideOptions[0]).getText()); + assertEquals(all, ((JMenuItem) hideOptions[0]).getText()); assertTrue(hideOptions[1] instanceof JPopupMenu.Separator); assertEquals(JSeparator.HORIZONTAL, ((JSeparator) hideOptions[1]).getOrientation()); @@ -383,12 +384,13 @@ public class PopupMenuTest assertEquals(2, showOptions.length); // includes 'All' and separator assertEquals(4, hideOptions.length); - assertEquals("All", ((JMenuItem) showOptions[0]).getText()); + String all = MessageManager.getString("label.all"); + assertEquals(all, ((JMenuItem) showOptions[0]).getText()); assertTrue(showOptions[1] instanceof JPopupMenu.Separator); assertEquals(JSeparator.HORIZONTAL, ((JSeparator) showOptions[1]).getOrientation()); - assertEquals("All", ((JMenuItem) hideOptions[0]).getText()); + assertEquals(all, ((JMenuItem) hideOptions[0]).getText()); assertTrue(hideOptions[1] instanceof JPopupMenu.Separator); assertEquals(JSeparator.HORIZONTAL, ((JSeparator) hideOptions[1]).getOrientation()); @@ -440,7 +442,8 @@ public class PopupMenuTest assertEquals(4, showOptions.length); // includes 'All' and separator assertEquals(2, hideOptions.length); - assertEquals("All", ((JMenuItem) showOptions[0]).getText()); + String all = MessageManager.getString("label.all"); + assertEquals(all, ((JMenuItem) showOptions[0]).getText()); assertTrue(showOptions[1] instanceof JPopupMenu.Separator); assertEquals(JSeparator.HORIZONTAL, ((JSeparator) showOptions[1]).getOrientation()); @@ -450,7 +453,7 @@ public class PopupMenuTest assertEquals("Temp", ((JMenuItem) showOptions[3]).getText()); assertEquals("PDB2", ((JMenuItem) showOptions[3]).getToolTipText()); - assertEquals("All", ((JMenuItem) hideOptions[0]).getText()); + assertEquals(all, ((JMenuItem) hideOptions[0]).getText()); assertTrue(hideOptions[1] instanceof JPopupMenu.Separator); assertEquals(JSeparator.HORIZONTAL, ((JSeparator) hideOptions[1]).getOrientation()); -- 1.7.10.2