git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
db37113
)
JAL-1354 use i18n text for expected value
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 16 Dec 2016 08:55:13 +0000
(08:55 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 16 Dec 2016 08:55:13 +0000
(08:55 +0000)
test/jalview/gui/PopupMenuTest.java
patch
|
blob
|
history
diff --git
a/test/jalview/gui/PopupMenuTest.java
b/test/jalview/gui/PopupMenuTest.java
index
922d457
..
335240b
100644
(file)
--- 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(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());
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("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());
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(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());
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());
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(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());
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("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());
assertTrue(hideOptions[1] instanceof JPopupMenu.Separator);
assertEquals(JSeparator.HORIZONTAL,
((JSeparator) hideOptions[1]).getOrientation());