Move most API of CommandParts to util classes

Gradual transition to removing CommandParts altogether.
 - Move logic from CommandParts to utils classes
This commit is contained in:
ljacqu
2015-12-04 23:19:37 +01:00
parent bb93c7164a
commit 2faad44ffa
19 changed files with 278 additions and 117 deletions
@@ -12,6 +12,8 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import java.util.ArrayList;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -40,7 +42,7 @@ public class LogoutCommandTest {
LogoutCommand command = new LogoutCommand();
// when
command.executeCommand(sender, new CommandParts(), new CommandParts());
command.executeCommand(sender, new CommandParts(new ArrayList<String>()), new CommandParts(new ArrayList<String>()));
// then
Mockito.verify(managementMock, never()).performLogout(any(Player.class));
@@ -53,7 +55,7 @@ public class LogoutCommandTest {
LogoutCommand command = new LogoutCommand();
// when
command.executeCommand(sender, new CommandParts(), new CommandParts("password"));
command.executeCommand(sender, new CommandParts(new ArrayList<String>()), new CommandParts("password"));
// then
Mockito.verify(managementMock).performLogout(sender);