Class InputOptions.Test

  extended by
Enclosing class:

public static class InputOptions.Test
extends Object

A standalone test class to exercise the InputOptions class.

You can work with the InputOptions class in isolation to get a feel for what it does, using the inner class InputOptions.Test. Invoke the class as a main program.

The argument choices are:

   main(?LIST) -- displays recommended test sequence
   main(name-test)  -- displays diagnostics for InputOptions::Test class
   main(name-inputoptions)  -- displays diagnostics for InputOptions class
   main(no-init) -- no diagnostics, as $settings not used by Data::Diagnostic
   main(validate) -- checks validation of parameters by paramMap
   main(all) -- displays diagnostics for all classes
   main(mode1 - mode4) -- 4 tests checking mode selection of params
   main(cmd-override) -- override config value with cmdline value
   main(cmd-override-ignored) -- ignore cmdline override due to no request flag 
   main(cmd-override-pwd) -- override config value with password required
   main(cmd-override-pwd-invalid) -- ignore override due to invalid password
   main("a=x","b=y",...) -- uses the specified command-line settings
        -- reads config file, and overrides with the command-line settings
(Note that if you use a configuration file, to actually see any output you must at least turn on the bit for STDERR with OUTPUT_DIAG=2.)

Try this, for example: create a configuration file called settings.conf which defines INPUTOPTIONS_DIAG=16. Run this:
 java path.InputOptions$Test settings.conf DIAG_LEVEL=16
to see the diagnostics for InputOptions, or use any other value for DIAG_LEVEL (which does not contain the bit for the value 16) to suppress them.

Constructor Summary
Method Summary
static void main(String[] args)
          Main program for this standalone test class.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public InputOptions.Test()
Method Detail


public static void main(String[] args)
                 throws IOException
Main program for this standalone test class.

args - filename and/or property assignments
IOException - if any problems reading the file.

CleanCode Java Libraries Copyright © 2001-2012 Michael Sorens - Revised 2012.12.10 Get CleanCode at Fast, secure and Free Open Source software downloads