javawrapper::TestStormBehaviors Class Reference

Tests the Storms behavior of the DisturbanceBehaviors class. More...

Inheritance diagram for javawrapper::TestStormBehaviors:

javawrapper::ModelTestCase List of all members.

Public Member Functions

void testFormatDataForDisplay ()
 Makes sure the correct options are displayed in parameters.
void testReadParFile () throws ModelException
 Tests parameter file reading.
void testParFileBackwardsCompatibility () throws ModelException
 Tests backwards compatible parameter file reading.
void testValidateData () throws ModelException
 Tests ValidateData().

Protected Member Functions

String WriteXMLValidFile1 () throws java.io.IOException
 Writes a valid file for storms with deterministic uniform damage.
String WriteXMLValidFile2 () throws java.io.IOException
 Writes a valid file for storms with stochastic uniform damage.
String WriteXMLValidFile3 () throws java.io.IOException
 Writes a valid file for storms with stochastic uniform damage and a negative binomial function.
String WriteXMLValidFile4 () throws java.io.IOException
 Writes a parameter file for a uniform mapped damage pattern.
String WriteXMLValidFile5 () throws java.io.IOException
 Writes a parameter file for a stochastic mapped damage pattern.
String WriteXMLValidWindstormFile () throws java.io.IOException
 Writes a valid file for windstorms.
String Write6_05XMLFile () throws java.io.IOException
 Writes a 6.05 file.
String WriteXMLErrorFile1 () throws java.io.IOException
 Writes a parameter file where there are grid maps for both "Storm Damage" and "Storm Susceptibility" and the grid cell resolutions don't match.
String WriteXMLErrorFile2 () throws java.io.IOException
 Writes a parameter file where the damage pattern is set to "mapped" but there is no "Storm Susceptibility" grid map in the parameter file.
String WriteXMLErrorFile3 () throws java.io.IOException
 Writes a parameter file where not all storm return interval values are positive.
String WriteXMLErrorFile4 () throws java.io.IOException
 Writes a parameter file where the storm damage applier behavior is enabled but not the storm behavior.
String WriteXMLErrorFile5 () throws java.io.IOException
 Writes a file where the number of years to heal is negative.
String WriteXMLErrorFile6 () throws java.io.IOException
 Writes a file where the "Storm Killer" behavior is enabled but not the "Storm Damage Applier".
String WriteXMLErrorFile7 () throws java.io.IOException
 Writes a file where the species/type combos assigned to "Storm Damage Applier" and "Storm Killer" don't match.
String WriteXMLErrorFile8 () throws java.io.IOException
 Writes a file where the proportion of trees with total damage that tip up is not a proportion.
String WriteXMLErrorFile9 () throws java.io.IOException
 Writes a file where the snag lifetime is negative.
String WriteNeutralFile () throws java.io.IOException
 Writes a file with no disturbance behaviors.

Private Member Functions

void WriteFileStart (FileWriter oOut) throws java.io.IOException
 Writes beginning portion of test parameter files.
void WriteBehaviorList (FileWriter oOut) throws java.io.IOException
 Writes storm behavior list.
void WriteStormParameters (FileWriter oOut) throws java.io.IOException
 Writes storm parameters.

Detailed Description

Tests the Storms behavior of the DisturbanceBehaviors class.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0


Member Function Documentation

void javawrapper::TestStormBehaviors::testParFileBackwardsCompatibility (  )  throws ModelException [inline]

Tests backwards compatible parameter file reading.

Exceptions:
ModelException if a test fails or a parameter file cannot be written or parsed.

void javawrapper::TestStormBehaviors::testReadParFile (  )  throws ModelException [inline]

Tests parameter file reading.

This makes sure that all values for storms make it where they are supposed to.

Exceptions:
ModelException if a test fails or a parameter file cannot be written or parsed.

void javawrapper::TestStormBehaviors::testValidateData (  )  throws ModelException [inline]

Tests ValidateData().

Four valid files and 10 invalid files are put through.

Exceptions:
ModelException if the validation happens incorrectly.

String javawrapper::TestStormBehaviors::Write6_05XMLFile (  )  throws java.io.IOException [inline, protected]

Writes a 6.05 file.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
January 9, 2006: Created (LEM)

void javawrapper::TestStormBehaviors::WriteBehaviorList ( FileWriter  oOut  )  throws java.io.IOException [inline, private]

Writes storm behavior list.

Parameters:
oOut FileWriter Filestream to write to.
Exceptions:
IOException if there is a problem writing the file.

void javawrapper::TestStormBehaviors::WriteFileStart ( FileWriter  oOut  )  throws java.io.IOException [inline, private]

Writes beginning portion of test parameter files.

Parameters:
oOut FileWriter Filestream to write to.
Exceptions:
IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteNeutralFile (  )  throws java.io.IOException [inline, protected]

Writes a file with no disturbance behaviors.

Returns:
String Filename written.
Exceptions:
IOException if there is a problem writing the file.

void javawrapper::TestStormBehaviors::WriteStormParameters ( FileWriter  oOut  )  throws java.io.IOException [inline, private]

Writes storm parameters.

Parameters:
oOut FileWriter Filestream to write to.
Exceptions:
IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLErrorFile1 (  )  throws java.io.IOException [inline, protected]

Writes a parameter file where there are grid maps for both "Storm Damage" and "Storm Susceptibility" and the grid cell resolutions don't match.

Returns:
Filename written.
Exceptions:
java.io.IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLErrorFile2 (  )  throws java.io.IOException [inline, protected]

Writes a parameter file where the damage pattern is set to "mapped" but there is no "Storm Susceptibility" grid map in the parameter file.

Returns:
Filename written.
Exceptions:
java.io.IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLErrorFile3 (  )  throws java.io.IOException [inline, protected]

Writes a parameter file where not all storm return interval values are positive.

Returns:
Filename written.
Exceptions:
java.io.IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLErrorFile4 (  )  throws java.io.IOException [inline, protected]

Writes a parameter file where the storm damage applier behavior is enabled but not the storm behavior.

Returns:
Filename written.
Exceptions:
java.io.IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLErrorFile5 (  )  throws java.io.IOException [inline, protected]

Writes a file where the number of years to heal is negative.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
September 29, 2004: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLErrorFile6 (  )  throws java.io.IOException [inline, protected]

Writes a file where the "Storm Killer" behavior is enabled but not the "Storm Damage Applier".

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
April 4, 2005: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLErrorFile7 (  )  throws java.io.IOException [inline, protected]

Writes a file where the species/type combos assigned to "Storm Damage Applier" and "Storm Killer" don't match.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
April 4, 2005: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLErrorFile8 (  )  throws java.io.IOException [inline, protected]

Writes a file where the proportion of trees with total damage that tip up is not a proportion.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
May 2, 2005: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLErrorFile9 (  )  throws java.io.IOException [inline, protected]

Writes a file where the snag lifetime is negative.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
May 2, 2005: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLValidFile1 (  )  throws java.io.IOException [inline, protected]

Writes a valid file for storms with deterministic uniform damage.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
September 6, 2004: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLValidFile2 (  )  throws java.io.IOException [inline, protected]

Writes a valid file for storms with stochastic uniform damage.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
September 6, 2004: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLValidFile3 (  )  throws java.io.IOException [inline, protected]

Writes a valid file for storms with stochastic uniform damage and a negative binomial function.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
September 6, 2004: Created (LEM)

String javawrapper::TestStormBehaviors::WriteXMLValidFile4 (  )  throws java.io.IOException [inline, protected]

Writes a parameter file for a uniform mapped damage pattern.

There is a grid map for "Storm Susceptibility".

Returns:
Filename written.
Exceptions:
java.io.IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLValidFile5 (  )  throws java.io.IOException [inline, protected]

Writes a parameter file for a stochastic mapped damage pattern.

There is a grid map for "Storm Susceptibility".

Returns:
Filename written.
Exceptions:
java.io.IOException if there is a problem writing the file.

String javawrapper::TestStormBehaviors::WriteXMLValidWindstormFile (  )  throws java.io.IOException [inline, protected]

Writes a valid file for windstorms.

Returns:
The file name.
Exceptions:
java.io.IOException if there is a problem writing the file.

Edit history:
------------------
March 19, 2006: Created (LEM)


The documentation for this class was generated from the following file:
Generated on Fri Jan 5 14:00:40 2007 for SORTIE Java Interface by  doxygen 1.4.7