#829 Move CommandSender / name to first argument to avoid confusion with varargs

- Overloaded method with (String, String...) as args was problematic as it could be confusing on its own and also confusing with the (CommandSender, String...) flavor
This commit is contained in:
ljacqu
2018-03-10 16:58:30 +01:00
parent 7a3e2e9f71
commit 1a53cd11b2
17 changed files with 42 additions and 42 deletions
@@ -85,14 +85,14 @@ public class CommonServiceTest {
MessageKey key = MessageKey.ACCOUNT_NOT_ACTIVATED;
Player player = mock(Player.class);
String text = "Test text";
given(messages.retrieveSingle(key, player)).willReturn(text);
given(messages.retrieveSingle(player, key)).willReturn(text);
// when
String result = commonService.retrieveSingleMessage(key, player);
String result = commonService.retrieveSingleMessage(player, key);
// then
assertThat(result, equalTo(text));
verify(messages).retrieveSingle(key, player);
verify(messages).retrieveSingle(player, key);
}
@Test