cdx.scorebot.net.tests.smb
Class ReadFile

java.lang.Object
  extended by cdx.scorebot.net.tests.Test<SMBService>
      extended by cdx.scorebot.net.tests.smb.ReadFile
All Implemented Interfaces:
java.io.Serializable

public class ReadFile
extends Test<SMBService>
implements java.io.Serializable

tries to read a file from the share

Author:
Sean Sullivan, David Underhill
See Also:
Serialized Form

Constructor Summary
  ReadFile(SMBService service)
          Instantiates a test (with no configuration) for the purpose of instantiating tests of this type with different configurations later.
protected ReadFile(SMBService service, java.util.HashMap<java.lang.String,ConfigOption> config)
          Instantiates a test with the specified config (it will verify that it includes all needed configuration options).
 
Method Summary
protected  java.util.HashMap<java.lang.String,ConfigOption> getDefaultConfigValues()
          returns a key-value pair of what options are available for configuration along with their default values
 Test instantiate(java.util.HashMap<java.lang.String,ConfigOption> config)
          Instantiates a test of this type with the specified config (verify that it includes all needed configuration options).
static void main(java.lang.String[] args)
           
protected  void prepareDefaultResults(TestEvent results)
          give all results the test returns some default value
 void run(TestEvent results)
          run the test and put all results into the results TestEvent object
 void verifyConfigValue(java.lang.String optionName, ConfigOption optionValue)
          Determine whether the specified configuration option is a valid value.
 
Methods inherited from class cdx.scorebot.net.tests.Test
equals, getConfig, getConfig, getDefaultConfigValuesCopy, getInitialConfigCopy, getService, run, setService, verifyConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadFile

public ReadFile(SMBService service)
Instantiates a test (with no configuration) for the purpose of instantiating tests of this type with different configurations later.

Parameters:
service - the service this test will run against

ReadFile

protected ReadFile(SMBService service,
                   java.util.HashMap<java.lang.String,ConfigOption> config)
Instantiates a test with the specified config (it will verify that it includes all needed configuration options).

Parameters:
service - the service this test will run against
config - the test configuration information used when the test is run (warning: these options may change when verified)
Method Detail

getDefaultConfigValues

protected java.util.HashMap<java.lang.String,ConfigOption> getDefaultConfigValues()
Description copied from class: Test
returns a key-value pair of what options are available for configuration along with their default values

Specified by:
getDefaultConfigValues in class Test<SMBService>
Returns:
options which may be used to configure the test

instantiate

public Test instantiate(java.util.HashMap<java.lang.String,ConfigOption> config)
Description copied from class: Test
Instantiates a test of this type with the specified config (verify that it includes all needed configuration options).

Specified by:
instantiate in class Test<SMBService>
Parameters:
config - the test configuration information used when the test is run (warning: these options may change when verified)
Returns:
returns a new instantiation of this Test with the specified configuration.

prepareDefaultResults

protected void prepareDefaultResults(TestEvent results)
Description copied from class: Test
give all results the test returns some default value

Specified by:
prepareDefaultResults in class Test<SMBService>

run

public void run(TestEvent results)
Description copied from class: Test
run the test and put all results into the results TestEvent object

Specified by:
run in class Test<SMBService>
Parameters:
results - the results of the Test are stored here

verifyConfigValue

public void verifyConfigValue(java.lang.String optionName,
                              ConfigOption optionValue)
                       throws TestMisconfigurationException
Description copied from class: Test
Determine whether the specified configuration option is a valid value. If it is not, should throw a TestMisconfigurationException

Specified by:
verifyConfigValue in class Test<SMBService>
Parameters:
optionName - the name of the option (the key in the config HashMap)
optionValue - the value of the option (the value in the config HashMap); will not be null
Throws:
TestMisconfigurationException

main

public static void main(java.lang.String[] args)