clTestWeibullSnagMort Class Reference

Tests the clWeibullSnagMort class. More...

#include <TestWeibullSnagMort.h>

List of all members.

Public Member Functions

void TestWeibullSnagMort ()
 Encapsulates all the testing functions together.
void TestNormalProcessing (clSimManager *p_oSimManager)
 Tests the mortality classes.
void TestExceptionProcessing (clSimManager *p_oSimManager)
 Tests exception processing.
void TestBackwardsCompatibility (clSimManager *p_oSimManager)
 This tests backwards compatibility with version 1.0.

Protected Member Functions

char * WriteXMLFile1 ()
 Writes a parameter file with the specifications given for TestWeibullSnagMort(), run 1.
char * WriteXMLFile2 ()
 Writes a parameter file with the specifications given for TestWeibullSnagMort, run 2.
char * WriteXMLFile3 ()
 Writes a parameter file with the specifications given for TestBackwardsCompatibility().
char * WriteXMLErrorFile1 ()
 Writes a file where the size classes overlap.
char * WriteXMLErrorFile2 ()
 Writes a file where a tree type other than snag is assigned to the behavior.


Detailed Description

Tests the clWeibullSnagMort class.

Author:
Lora E. Murphy


Member Function Documentation

void clTestWeibullSnagMort::TestNormalProcessing ( clSimManager *  p_oSimManager  ) 

Tests the mortality classes.

First run: WriteXMLFile1() creates the parameter file. The file has the following characteristics:

The function does the following:
  1. 1000 snags are created of each tree species in each of the size classes.
  2. The model is run for 10 timesteps. After each timestep, the remaining trees of each tree type and size class are counted.
  3. The counts are compared to expected results, give or take 5%.

Second run: WriteXMLFile2() creates the parameter file. The file has the following characteristics:

The function does the following:
  1. 1000 snags are created of each tree species in each of the size classes.
  2. The model is run for 10 timesteps. After each timestep, the remaining trees of each tree type and size class are counted.
  3. The counts are compared to expected results, give or take 5% (greater margins are allowed for smaller numbers).
Parameters:
p_oSimManager Object to run the testing.

void clTestWeibullSnagMort::TestExceptionProcessing ( clSimManager *  p_oSimManager  ) 

Tests exception processing.

Tests the following error conditions:

Parameters:
p_oSimManager Object to run the testing.

void clTestWeibullSnagMort::TestBackwardsCompatibility ( clSimManager *  p_oSimManager  ) 

This tests backwards compatibility with version 1.0.

This will enter a parameter file where the size class definitions are in the old style as single values. This tests to make sure that the single values are assigned to all species. This runs a test like TestNormalProcessing, if all size classes were the same as species 1. WriteXMLFile3 is used for setup.

char* clTestWeibullSnagMort::WriteXMLFile1 (  )  [protected]

Writes a parameter file with the specifications given for TestWeibullSnagMort(), run 1.

Returns:
Filename written.

char* clTestWeibullSnagMort::WriteXMLFile2 (  )  [protected]

Writes a parameter file with the specifications given for TestWeibullSnagMort, run 2.

Returns:
Filename written.

char* clTestWeibullSnagMort::WriteXMLFile3 (  )  [protected]

Writes a parameter file with the specifications given for TestBackwardsCompatibility().

Returns:
Filename written.

char* clTestWeibullSnagMort::WriteXMLErrorFile1 (  )  [protected]

Writes a file where the size classes overlap.

Returns:
Filename written.

char* clTestWeibullSnagMort::WriteXMLErrorFile2 (  )  [protected]

Writes a file where a tree type other than snag is assigned to the behavior.

Returns:
Filename written.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:35:12 2007 for SORTIE C++ Test Documentation by  doxygen 1.5.2