@@ -122,6 +122,10 @@ public void setUp() throws Exception {
122
122
when (user .getPlayer ()).thenReturn (player );
123
123
when (user .inWorld ()).thenReturn (true );
124
124
when (user .getWorld ()).thenReturn (world );
125
+ when (user .getTranslationOrNothing (anyString (), anyString ()))
126
+ .thenAnswer ((Answer <String >) invocation -> invocation .getArgument (0 , String .class ));
127
+ when (user .getTranslationOrNothing (anyString ()))
128
+ .thenAnswer ((Answer <String >) invocation -> invocation .getArgument (0 , String .class ));
125
129
when (user .getTranslation (anyString ()))
126
130
.thenAnswer ((Answer <String >) invocation -> invocation .getArgument (0 , String .class ));
127
131
when (user .getTranslation (anyString (), anyString (), anyString ()))
@@ -215,7 +219,8 @@ public void testOnClickTooManyCommands() {
215
219
when (cm .getCommands ()).thenReturn (map );
216
220
217
221
assertTrue (crcl .onClick (panel , user , ClickType .LEFT , 0 ));
218
- verify (user ).getTranslation ("protection.panel.flag-item.description-layout" , TextVariables .DESCRIPTION , "" );
222
+ verify (user ).getTranslation ("protection.panel.flag-item.description-layout" , TextVariables .DESCRIPTION ,
223
+ "protection.panel.flag-item.command-instructions." );
219
224
}
220
225
221
226
/**
@@ -226,12 +231,12 @@ public void testGetPanelItem() {
226
231
assertTrue (crcl .onClick (panel , user , ClickType .LEFT , 0 ));
227
232
PanelItem pi = crcl .getPanelItem ("test" , user , world );
228
233
assertEquals (Material .MAP , pi .getItem ().getType ());
229
- assertEquals ("protection.panel.flag-item.description-layout" , pi .getDescription ().get (0 ));
234
+ // assertEquals("protection.panel.flag-item.description-layout", pi.getDescription().get(0));
230
235
//assertEquals("protection.panel.flag-item.minimal-rankranks.member", pi.getDescription().get(1));
231
236
//assertEquals("protection.panel.flag-item.allowed-rankranks.sub-owner", pi.getDescription().get(2));
232
- //assertEquals("protection.panel.flag-item.allowed-rankranks.owner", pi.getDescription().get(3 ));
237
+ //assertEquals("protection.panel.flag-item.allowed-rankranks.owner", pi.getDescription().get(0 ));
233
238
assertTrue (pi .getClickHandler ().isPresent ());
234
- assertEquals ("test " , pi .getName ());
239
+ assertEquals ("protection.panel.flag-item.name-layout " , pi .getName ());
235
240
}
236
241
237
242
}
0 commit comments