Package org.apache.ftpserver.command

Examples of org.apache.ftpserver.command.NOOP


  }

  public void testOverride() {
    DefaultCommandFactory factory = new DefaultCommandFactory();
    Map<String, Command> commands = new HashMap<String, Command>();
    commands.put("stor", new NOOP());
    factory.setCommandMap(commands);
   
    Command command = factory.getCommand("Stor");
   
    assertTrue(command instanceof NOOP);
View Full Code Here


  }

  public void testAppend() {
    DefaultCommandFactory factory = new DefaultCommandFactory();
    Map<String, Command> commands = new HashMap<String, Command>();
    commands.put("foo", new NOOP());
    factory.setCommandMap(commands);
   
    assertTrue(factory.getCommand("FOO") instanceof NOOP);
    assertTrue(factory.getCommand("stor") instanceof STOR);
  }
View Full Code Here

  public void testAppendWithoutDefault() {
    DefaultCommandFactory factory = new DefaultCommandFactory();
    factory.setUseDefaultCommands(false);
    Map<String, Command> commands = new HashMap<String, Command>();
    commands.put("foo", new NOOP());
    factory.setCommandMap(commands);
   
    assertTrue(factory.getCommand("FOO") instanceof NOOP);
    assertNull(factory.getCommand("stor"));
  }
View Full Code Here

    }

    public void testOverride() {
        DefaultCommandFactory factory = new DefaultCommandFactory();
        Map<String, Command> commands = new HashMap<String, Command>();
        commands.put("stor", new NOOP());
        factory.setCommandMap(commands);

        Command command = factory.getCommand("Stor");

        assertTrue(command instanceof NOOP);
View Full Code Here

    }

    public void testAppend() {
        DefaultCommandFactory factory = new DefaultCommandFactory();
        Map<String, Command> commands = new HashMap<String, Command>();
        commands.put("foo", new NOOP());
        factory.setCommandMap(commands);

        assertTrue(factory.getCommand("FOO") instanceof NOOP);
        assertTrue(factory.getCommand("stor") instanceof STOR);
    }
View Full Code Here

    public void testAppendWithoutDefault() {
        DefaultCommandFactory factory = new DefaultCommandFactory();
        factory.setUseDefaultCommands(false);
        Map<String, Command> commands = new HashMap<String, Command>();
        commands.put("foo", new NOOP());
        factory.setCommandMap(commands);

        assertTrue(factory.getCommand("FOO") instanceof NOOP);
        assertNull(factory.getCommand("stor"));
    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.command.NOOP

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.