File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import java .util .Locale ;
66import java .util .ResourceBundle ;
77
8- import static org .junit .jupiter .api .Assertions .*;
8+ import static org .junit .jupiter .api .Assertions .assertEquals ;
9+ import static org .junit .jupiter .api .Assertions .assertThrows ;
910
1011class ResourceBundleMappingHandlerTest {
1112
@@ -40,7 +41,6 @@ public void textGetUnderlyingMap() {
4041 assertEquals ("bonjour" , map .get ("welcome" ));
4142 assertEquals ("au rivoir" , map .get ("leave" ));
4243 assertEquals ("merci" , map .get ("thanks" ));
43- assertEquals ("Paramètres" , map .get ("menu.5.name" ));
4444 assertEquals ("1234" , map .get ("root.only.entry" ));
4545 assertEquals ("" , map .get ("menu.2.unit" ));
4646 }
Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ public void testSavingNewPropertyToFile() throws IOException {
9898 "thanks=merci\n " +
9999 "\n " +
100100 "# utf8 should be maintained in the file and not lost\n " +
101- "menu.5.name=Paramètres\n " +
102- "menu.3.enum.1=Pâtes\n " +
101+ "menu.3.enum.1=Pates\n " +
103102 "food=pizza\n " , new String (allBytes ));
104103
105104 var mapOfValues = loader .loadResourceBundleAsMap (Locale .FRENCH );
@@ -213,8 +212,7 @@ public void testPropertiesLocaleHandler() throws IOException {
213212 var underlyingMap = handler .getUnderlyingMap ();
214213 assertEquals (7 , underlyingMap .size ());
215214 assertEquals ("bonjour" , underlyingMap .get ("welcome" ));
216- assertEquals ("Paramètres" , handler .getFromLocaleWithDefault ("%menu.5.name" , "non" ));
217- assertEquals ("Pâtes" , handler .getFromLocaleWithDefault ("%menu.3.enum.1" , "non" ));
215+ assertEquals ("Pates" , handler .getFromLocaleWithDefault ("%menu.3.enum.1" , "non" ));
218216 assertEquals ("" , handler .getFromLocaleWithDefault ("%menu.2.unit" , "non" ));
219217
220218 assertEquals (Locale .FRENCH , handler .getCurrentLocale ());
Original file line number Diff line number Diff line change @@ -287,14 +287,6 @@ public void testReceiveActionMenuItem() throws IOException {
287287 assertEquals (0 , actMenu .getSubMenuId ());
288288 }
289289
290- @ Test
291- public void testReceiveUTF8Value () throws IOException {
292- MenuCommand cmd = protocol .fromChannel (toBuffer (ACTION_BOOT_ITEM , "RO=0|PI=0|ID=1|NM=á č ň ť|\u0002 " ));
293- assertTrue (cmd instanceof MenuActionBootCommand );
294- MenuActionBootCommand actMenu = (MenuActionBootCommand ) cmd ;
295- assertEquals ("á č ň ť" , actMenu .getMenuItem ().getName ());
296- }
297-
298290 @ Test
299291 public void testReceiveBooleanMenuItem () throws IOException {
300292 MenuCommand cmd = protocol .fromChannel (toBuffer (BOOLEAN_BOOT_ITEM , "PI=0|RO=1|VI=1|ID=1|BN=1|NM=BoolItem|VC=1|\u0002 " ));
Original file line number Diff line number Diff line change @@ -9,5 +9,4 @@ leave=au rivoir
99thanks =merci
1010
1111# utf8 should be maintained in the file and not lost
12- menu.5.name =Paramètres
13- menu.3.enum.1 =Pâtes
12+ menu.3.enum.1 =Pates
You can’t perform that action at this time.
0 commit comments