org.sourceforge.jemm.server
Class ServerOptionsTest

java.lang.Object
  extended by org.sourceforge.jemm.server.ServerOptionsTest

public class ServerOptionsTest
extends java.lang.Object


Constructor Summary
ServerOptionsTest()
           
 
Method Summary
 void testDefaultControlPort()
           
 void testDefaultPort()
          Test that if not set the default client port is correctly set.
 void testEqualPortError()
          Tests that if the client and control ports are set to the same an error is generated.
 void testIllegalAction()
           
 void testIllegalControlPort()
           
 void testIllegalControlPort2()
           
 void testIllegalMemoryMode()
           
 void testIllegalPort()
           
 void testIllegalPort2()
          Tests that a negative port number generates an exception.
 void testModeDefault()
           
 void testModeIllegal()
           
 void testModeMemory()
           
 void testModePersistent()
           
 void testNoAction()
          Test command line with no action defined
 void testPersistentDataDir()
           
 void testPersistentMissingDataDir()
           
 void testPersistentNoDataDir()
           
 void testStartAction()
          Tests that the start action is correctly picked up.
 void testStopAction()
          Tests that the stop action is correctly picked up.
 void testValidControlPort()
           
 void testValidPort()
          Test that if set the client port is correctly parsed.
 void toStringTest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerOptionsTest

public ServerOptionsTest()
Method Detail

testModeDefault

public void testModeDefault()
                     throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testModePersistent

public void testModePersistent()
                        throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testPersistentNoDataDir

public void testPersistentNoDataDir()
                             throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testPersistentDataDir

public void testPersistentDataDir()
                           throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testPersistentMissingDataDir

public void testPersistentMissingDataDir()
                                  throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testModeMemory

public void testModeMemory()
                    throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testModeIllegal

public void testModeIllegal()
                     throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testIllegalMemoryMode

public void testIllegalMemoryMode()
                           throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testIllegalControlPort

public void testIllegalControlPort()
                            throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testIllegalControlPort2

public void testIllegalControlPort2()
                             throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testValidControlPort

public void testValidControlPort()
                          throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testDefaultControlPort

public void testDefaultControlPort()
                            throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testIllegalPort

public void testIllegalPort()
                     throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testIllegalPort2

public void testIllegalPort2()
                      throws org.apache.commons.cli.ParseException
Tests that a negative port number generates an exception.

Throws:
org.apache.commons.cli.ParseException - Expected, arguments illegal.

testValidPort

public void testValidPort()
                   throws org.apache.commons.cli.ParseException
Test that if set the client port is correctly parsed.

Throws:
org.apache.commons.cli.ParseException - On error

testDefaultPort

public void testDefaultPort()
                     throws org.apache.commons.cli.ParseException
Test that if not set the default client port is correctly set.

Throws:
org.apache.commons.cli.ParseException - On error

testEqualPortError

public void testEqualPortError()
                        throws org.apache.commons.cli.ParseException
Tests that if the client and control ports are set to the same an error is generated.

Throws:
org.apache.commons.cli.ParseException - Expected

testStartAction

public void testStartAction()
                     throws org.apache.commons.cli.ParseException
Tests that the start action is correctly picked up.

Throws:
org.apache.commons.cli.ParseException - On error

testStopAction

public void testStopAction()
                    throws org.apache.commons.cli.ParseException
Tests that the stop action is correctly picked up.

Throws:
org.apache.commons.cli.ParseException - On error

testIllegalAction

public void testIllegalAction()
                       throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

testNoAction

public void testNoAction()
                  throws org.apache.commons.cli.ParseException
Test command line with no action defined

Throws:
org.apache.commons.cli.ParseException

toStringTest

public void toStringTest()
                  throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException


Copyright © 2009. All Rights Reserved.