HomeSort by relevance Sort by last modified time
    Searched defs:commandHandler (Results 76 - 98 of 98) sorted by null

1 2 34

  /external/mockftpserver/MockFtpServer/src/test/java/org/mockftpserver/stub/command/
AlloCommandHandlerTest.java 38 private AlloCommandHandler commandHandler;
51 commandHandler.handleCommand(command1, session);
52 commandHandler.handleCommand(command2, session);
55 verifyNumberOfInvocations(commandHandler, 2);
56 verifyOneDataElement(commandHandler.getInvocation(0), AlloCommandHandler.NUMBER_OF_BYTES_KEY, new Integer(
58 verifyTwoDataElements(commandHandler.getInvocation(1), AlloCommandHandler.NUMBER_OF_BYTES_KEY, new Integer(
66 testHandleCommand_InvalidParameters(commandHandler, CommandNames.ALLO, EMPTY);
75 commandHandler.handleCommand(new Command(CommandNames.ALLO, array("123 R ")), session);
89 commandHandler.handleCommand(new Command(CommandNames.ALLO, array("xx")), session);
102 commandHandler.handleCommand(new Command(CommandNames.ALLO, array("123 R xx")), session);
    [all...]
FileRetrCommandHandlerTest.java 39 private FileRetrCommandHandler commandHandler;
59 commandHandler.setFile(null);
119 commandHandler.setFile("Sample.jpg");
121 commandHandler.handleCommand(command, session);
124 verifyNumberOfInvocations(commandHandler, 1);
125 verifyOneDataElement(commandHandler.getInvocation(0), FileRetrCommandHandler.PATHNAME_KEY, FILENAME1);
132 commandHandler.setFile("abc.txt"); // this property must be set
133 testHandleCommand_InvalidParameters(commandHandler, CommandNames.RETR, EMPTY);
141 commandHandler.handleCommand(new Command(CommandNames.RETR, EMPTY), session);
156 commandHandler = new FileRetrCommandHandler();
    [all...]
_AbstractStubDataCommandHandlerTest.java 51 private AbstractStubDataCommandHandler commandHandler;
67 // Define CommandHandler test subclass
68 commandHandler = new AbstractStubDataCommandHandler() {
94 commandHandler.setReplyTextBundle(replyTextBundle);
95 commandHandler.handleCommand(COMMAND, session, INVOCATION_RECORD);
114 commandHandler.setPreliminaryReplyCode(OVERRIDE_REPLY_CODE);
115 commandHandler.setPreliminaryReplyText(OVERRIDE_REPLY_TEXT);
116 commandHandler.setReplyTextBundle(replyTextBundle);
117 commandHandler.handleCommand(COMMAND, session, INVOCATION_RECORD);
127 commandHandler.setPreliminaryReplyCode(0);
    [all...]
  /external/mockftpserver/branches/1.x_Branch/src/test/java/org/mockftpserver/stub/command/
AlloCommandHandlerTest.java 38 private AlloCommandHandler commandHandler;
51 commandHandler.handleCommand(command1, session);
52 commandHandler.handleCommand(command2, session);
55 verifyNumberOfInvocations(commandHandler, 2);
56 verifyOneDataElement(commandHandler.getInvocation(0), AlloCommandHandler.NUMBER_OF_BYTES_KEY, new Integer(
58 verifyTwoDataElements(commandHandler.getInvocation(1), AlloCommandHandler.NUMBER_OF_BYTES_KEY, new Integer(
66 testHandleCommand_InvalidParameters(commandHandler, CommandNames.ALLO, EMPTY);
75 commandHandler.handleCommand(new Command(CommandNames.ALLO, array("123 R ")), session);
89 commandHandler.handleCommand(new Command(CommandNames.ALLO, array("xx")), session);
102 commandHandler.handleCommand(new Command(CommandNames.ALLO, array("123 R xx")), session);
    [all...]
FileRetrCommandHandlerTest.java 42 private FileRetrCommandHandler commandHandler;
62 commandHandler.setFile(null);
120 commandHandler.setFile("Sample.data");
122 commandHandler.handleCommand(command, session);
125 verifyNumberOfInvocations(commandHandler, 1);
126 verifyOneDataElement(commandHandler.getInvocation(0), FileRetrCommandHandler.PATHNAME_KEY, FILENAME1);
133 commandHandler.setFile("abc.txt"); // this property must be set
134 testHandleCommand_InvalidParameters(commandHandler, CommandNames.RETR, EMPTY);
142 commandHandler.handleCommand(new Command(CommandNames.RETR, EMPTY), session);
156 commandHandler = new FileRetrCommandHandler();
    [all...]
PortCommandHandlerTest.java 43 private PortCommandHandler commandHandler;
56 commandHandler.handleCommand(COMMAND, session);
59 verifyNumberOfInvocations(commandHandler, 1);
60 verifyTwoDataElements(commandHandler.getInvocation(0),
69 testHandleCommand_InvalidParameters(commandHandler, CommandNames.PORT, PARAMETERS_INSUFFICIENT);
152 commandHandler = new PortCommandHandler();
153 commandHandler.setReplyTextBundle(replyTextBundle);
_AbstractStubCommandHandlerTest.java 50 private AbstractStubCommandHandler commandHandler;
61 commandHandler.setReplyCode(REPLY_CODE1);
62 commandHandler.sendReply(session);
73 commandHandler.setReplyCode(REPLY_CODE1);
74 commandHandler.setReplyText(OVERRIDE_REPLY_TEXT);
75 commandHandler.sendReply(session);
86 commandHandler.setReplyCode(REPLY_CODE1);
87 commandHandler.setReplyMessageKey(Integer.toString(REPLY_CODE2));
88 commandHandler.sendReply(session);
97 commandHandler.sendReply(session);
    [all...]
_AbstractStubDataCommandHandlerTest.java 51 private AbstractStubDataCommandHandler commandHandler;
67 // Define CommandHandler test subclass
68 commandHandler = new AbstractStubDataCommandHandler() {
94 commandHandler.setReplyTextBundle(replyTextBundle);
95 commandHandler.handleCommand(COMMAND, session, INVOCATION_RECORD);
114 commandHandler.setPreliminaryReplyCode(OVERRIDE_REPLY_CODE);
115 commandHandler.setPreliminaryReplyText(OVERRIDE_REPLY_TEXT);
116 commandHandler.setReplyTextBundle(replyTextBundle);
117 commandHandler.handleCommand(COMMAND, session, INVOCATION_RECORD);
127 commandHandler.setPreliminaryReplyCode(0);
    [all...]
AbstractCommandHandlerTest.java 33 * Abstract superclass for CommandHandler tests
55 * @param commandHandler - the CommandHandler to test
59 protected void testHandleCommand_InvalidParameters(AbstractCommandHandler commandHandler,
63 commandHandler.handleCommand(new Command(commandName, parameters), session);
71 verifyNumberOfInvocations(commandHandler, 1);
75 * Verify that the CommandHandler contains the specified number of invocation records
77 * @param commandHandler - the CommandHandler
80 protected void verifyNumberOfInvocations(InvocationHistory commandHandler, int expected) {
    [all...]
  /external/mockftpserver/MockFtpServer/src/test/java/org/mockftpserver/core/command/
ReplyTextBundleUtilTest.java 41 * Test the setReplyTextBundleIfAppropriate() method, when the CommandHandler implements
45 AbstractTrackingCommandHandler commandHandler = new StaticReplyCommandHandler();
46 ReplyTextBundleUtil.setReplyTextBundleIfAppropriate(commandHandler, resourceBundle1);
47 assertSame(resourceBundle1, commandHandler.getReplyTextBundle());
51 * Test the setReplyTextBundleIfAppropriate() method, when the CommandHandler implements
55 AbstractTrackingCommandHandler commandHandler = new StaticReplyCommandHandler();
56 commandHandler.setReplyTextBundle(resourceBundle2);
57 ReplyTextBundleUtil.setReplyTextBundleIfAppropriate(commandHandler, resourceBundle1);
58 assertSame(resourceBundle2, commandHandler.getReplyTextBundle());
62 * Test the setReplyTextBundleIfAppropriate() method, when the CommandHandler does not
    [all...]
_AbstractCommandHandlerTest.java 46 private AbstractCommandHandler commandHandler;
74 commandHandler.assertValidReplyCode(1);
75 commandHandler.assertValidReplyCode(100);
89 commandHandler.assertValidReplyCode(invalidReplyCode);
110 commandHandler = new AbstractCommandHandler() {
123 commandHandler.setReplyTextBundle(replyTextBundle);
AbstractCommandHandlerTestCase.java 29 * Abstract superclass for CommandHandler tests
50 * @param commandHandler - the CommandHandler to test
54 protected void testHandleCommand_InvalidParameters(AbstractTrackingCommandHandler commandHandler,
60 commandHandler.handleCommand(command, session);
63 verifyNumberOfInvocations(commandHandler, 1);
64 verifyNoDataElements(commandHandler.getInvocation(0));
68 * Verify that the CommandHandler contains the specified number of invocation records
70 * @param commandHandler - the CommandHandler
    [all...]
  /external/mockftpserver/MockFtpServer/src/test/java/org/mockftpserver/stub/
StubFtpServerTest.java 19 import org.mockftpserver.core.command.CommandHandler;
39 private AbstractStubCommandHandler commandHandler;
40 private CommandHandler commandHandler_NoReplyTextBundle;
47 * Test the setCommandHandler() method, for a CommandHandler that does not implement ResourceBundleAware
51 assertSame("commandHandler", commandHandler_NoReplyTextBundle, stubFtpServer.getCommandHandler("ZZZ"));
55 * Test the setCommandHandler() method, for a CommandHandler that implements ReplyTextBundleAware,
59 stubFtpServer.setCommandHandler("ZZZ", commandHandler);
60 assertSame("commandHandler", commandHandler, stubFtpServer.getCommandHandler("ZZZ"));
61 assertSame("replyTextBundle", stubFtpServer.getReplyTextBundle(), commandHandler.getReplyTextBundle());
    [all...]
  /external/mockftpserver/branches/1.x_Branch/src/test/java/org/mockftpserver/core/command/
ReplyTextBundleUtilTest.java 40 * Test the setReplyTextBundleIfAppropriate() method, when the CommandHandler implements
44 AbstractCommandHandler commandHandler = new StaticReplyCommandHandler();
45 ReplyTextBundleUtil.setReplyTextBundleIfAppropriate(commandHandler, resourceBundle1);
46 assertSame(resourceBundle1, commandHandler.getReplyTextBundle());
50 * Test the setReplyTextBundleIfAppropriate() method, when the CommandHandler implements
54 AbstractCommandHandler commandHandler = new StaticReplyCommandHandler();
55 commandHandler.setReplyTextBundle(resourceBundle2);
56 ReplyTextBundleUtil.setReplyTextBundleIfAppropriate(commandHandler, resourceBundle1);
57 assertSame(resourceBundle2, commandHandler.getReplyTextBundle());
61 * Test the setReplyTextBundleIfAppropriate() method, when the CommandHandler does not
    [all...]
  /external/mockftpserver/branches/1.x_Branch/src/test/java/org/mockftpserver/stub/
StubFtpServerTest.java 25 import org.mockftpserver.core.command.CommandHandler;
47 private AbstractStubCommandHandler commandHandler;
48 private CommandHandler commandHandler_NoReplyTextBundle;
55 mapping.put("AAA", commandHandler);
59 assertSame("commandHandler1", commandHandler, stubFtpServer.getCommandHandler("AAA"));
62 assertSame("replyTextBundle", stubFtpServer.replyTextBundle, commandHandler.getReplyTextBundle());
82 * Test the setCommandHandler() method, for a CommandHandler that does not implement ResourceBundleAware
86 assertSame("commandHandler", commandHandler_NoReplyTextBundle, stubFtpServer.getCommandHandler("ZZZ"));
90 * Test the setCommandHandler() method, for a CommandHandler that implements ReplyTextBundleAware,
94 stubFtpServer.setCommandHandler("ZZZ", commandHandler);
    [all...]
  /external/mockftpserver/MockFtpServer/src/test/java/org/mockftpserver/core/server/
AbstractFtpServerTestCase.java 20 import org.mockftpserver.core.command.CommandHandler;
41 private CommandHandler commandHandler;
42 private CommandHandler commandHandler2;
49 mapping.put("AAA", commandHandler);
53 assertSame("commandHandler1", commandHandler, ftpServer.getCommandHandler("AAA"));
56 verifyCommandHandlerInitialized(commandHandler);
81 assertSame("commandHandler", commandHandler2, ftpServer.getCommandHandler("ZZZ"));
89 CommandHandler commandHandler = (CommandHandler) createMock(CommandHandler.class);
    [all...]
  /external/mockftpserver/MockFtpServer/src/main/java/org/mockftpserver/core/session/
DefaultSession.java 22 import org.mockftpserver.core.command.CommandHandler;
83 * @param commandHandlers - the Map of command name -> CommandHandler. It is assumed that the
380 CommandHandler connectCommandHandler = (CommandHandler) commandHandlers.get(CommandNames.CONNECT);
414 CommandHandler commandHandler = (CommandHandler) commandHandlers.get(normalizedCommandName);
416 if (commandHandler == null) {
417 commandHandler = (CommandHandler) commandHandlers.get(CommandNames.UNSUPPORTED);
    [all...]
  /external/mockftpserver/branches/1.x_Branch/src/main/java/org/mockftpserver/core/session/
DefaultSession.java 40 import org.mockftpserver.core.command.CommandHandler;
83 * @param commandHandlers - the Map of command name -> CommandHandler. It is assumed that the
378 CommandHandler connectCommandHandler = (CommandHandler) commandHandlers.get(CommandNames.CONNECT);
413 CommandHandler commandHandler = (CommandHandler) commandHandlers.get(normalizedCommandName);
414 Assert.notNull(commandHandler, "CommandHandler for command [" + normalizedCommandName + "]");
415 commandHandler.handleCommand(command, this);
    [all...]
  /external/mockftpserver/MockFtpServer/src/test/java/org/mockftpserver/core/session/
DefaultSession_RunTest.java 21 import org.mockftpserver.core.command.CommandHandler;
62 AbstractStubCommandHandler commandHandler = new AbstractStubCommandHandler() {
71 runCommandAndVerifyOutput(commandHandler, "");
75 CommandHandler commandHandler = new AbstractStubCommandHandler() {
81 runCommandAndVerifyOutput(commandHandler, "");
102 CommandHandler commandHandler = new AbstractStubCommandHandler() {
107 runCommandAndVerifyOutput(commandHandler, "");
113 CommandHandler commandHandler = new AbstractStubCommandHandler() {
    [all...]
  /external/mockftpserver/branches/1.x_Branch/src/main/java/org/mockftpserver/stub/
StubFtpServer.java 30 import org.mockftpserver.core.command.CommandHandler;
79 * server commands (e.g. RETR, DELE, LIST). These handlers implement the {@link CommandHandler}
85 * or reply codes. Or it can be replaced with a custom {@link CommandHandler}
101 * You can retrieve the existing {@link CommandHandler} defined for an FTP server command
109 * You can replace the existing {@link CommandHandler} defined for an FTP server command
110 * by calling the {@link #setCommandHandler(String, CommandHandler)} method, passing
111 * in the FTP server command name and {@link CommandHandler} instance. For example:
169 // Initialize the default CommandHandler mappings
316 * Return the CommandHandler defined for the specified command name
318 * @return the CommandHandler defined for name
    [all...]
  /external/mockftpserver/branches/1.x_Branch/src/test/java/org/mockftpserver/core/session/
DefaultSession_RunTest.java 30 import org.mockftpserver.core.command.CommandHandler;
72 * Test that the CommandHandler is properly initialized and passed the expected parameters
75 AbstractStubCommandHandler commandHandler = new AbstractStubCommandHandler() {
84 runCommandAndVerifyOutput(commandHandler, "");
93 CommandHandler commandHandler = new AbstractStubCommandHandler() {
99 runCommandAndVerifyOutput(commandHandler, "");
109 CommandHandler commandHandler = new AbstractStubCommandHandler() {
114 runCommandAndVerifyOutput(commandHandler, "");
    [all...]
  /external/mockftpserver/MockFtpServer/src/main/java/org/mockftpserver/core/server/
AbstractFtpServer.java 22 import org.mockftpserver.core.command.CommandHandler;
40 * server commands (e.g. RETR, DELE, LIST). These handlers implement the {@link org.mockftpserver.core.command.CommandHandler}
51 * You can set the existing {@link CommandHandler} defined for an FTP server command
52 * by calling the {@link #setCommandHandler(String, CommandHandler)} method, passing
53 * in the FTP server command name and {@link CommandHandler} instance.
57 * You can retrieve the existing {@link CommandHandler} defined for an FTP server command by
227 * Return the CommandHandler defined for the specified command name
230 * @return the CommandHandler defined for name
232 public CommandHandler getCommandHandler(String name) {
233 return (CommandHandler) commandHandlers.get(Command.normalizeName(name));
    [all...]
  /external/parameter-framework/upstream/parameter/
ParameterMgr.cpp     [all...]

Completed in 1162 milliseconds

1 2 34