clTestRandomBrowse Class Reference

Tests the clRandomBrowse class. More...

#include <TestRandomBrowse.h>

List of all members.

Public Member Functions

void TestRandomBrowse ()
 Consolidates the testing into a single function.

Protected Member Functions

void TestNormalRun1 (clSimManager *p_oSimManager)
 Tests normal processing run 1.
void TestNormalRun2 (clSimManager *p_oSimManager)
 Tests normal processing run 2.
void TestNormalRun3 (clSimManager *p_oSimManager)
 Tests normal processing run 3.
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
char * WriteXMLFile1 ()
 Writes a parameter file with the specifications given for TestRandomBrowse(), run 1.
char * WriteXMLFile2 ()
 Writes a parameter file with the specifications given for TestRandomBrowse(), run 2.
char * WriteXMLFile3 ()
 Writes a parameter file with the specifications given for TestRandomBrowse(), run 3.
char * WriteXMLErrorFile1 ()
 Writes a parameter file where the browse probabilities are not all between 0 and 1.


Detailed Description

Tests the clRandomBrowse class.

Author:
Lora E. Murphy

Member Function Documentation

void clTestRandomBrowse::TestRandomBrowse (  ) 

Consolidates the testing into a single function.

void clTestRandomBrowse::TestNormalRun1 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing run 1.

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

  • Timestep length of 1 year.
  • 5 species: Species 1, Species 2, Species 3, Species 4, Species 5.
  • Random browse behavior applied to seedlings and saplings of Species 1, 4 and 5, and seedlings of species 3.
The function does the following:
  1. 1000 trees are created of each tree species/type combination for seedlings, saplings, and adults.
  2. The model is run for 1 timestep.
  3. The number browsed are counted.
  4. The counts are compared to expected results, give or take 5%.
  5. The model is run for another timestep.
  6. The number browsed is expected to be roughly the same, but not exactly the same (i.e. a new set of browsed individuals has been chosen).
Parameters:
p_oSimManager Sim manager.

void clTestRandomBrowse::TestNormalRun2 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing run 2.

WriteXMLFile2() creates the parameter file. The run is exactly the same as run 1except the timestep length is three years, so the browse probabilities are compounded appropriately.

Parameters:
p_oSimManager Sim manager.

void clTestRandomBrowse::TestNormalRun3 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing run 3.

WriteXMLFile3() creates the parameter file. The probabilities are done on a normal random draw. This creates a large number of probabilities to test the draw.

Parameters:
p_oSimManager Sim manager.

void clTestRandomBrowse::TestErrorProcessing ( clSimManager *  p_oSimManager  )  [protected]

Tests error processing.

Parameters:
p_oSimManager Sim manager.

char* clTestRandomBrowse::WriteXMLFile1 (  )  [protected]

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

Returns:
Filename written.

char* clTestRandomBrowse::WriteXMLFile2 (  )  [protected]

Writes a parameter file with the specifications given for TestRandomBrowse(), run 2.

Returns:
Filename written.

char* clTestRandomBrowse::WriteXMLFile3 (  )  [protected]

Writes a parameter file with the specifications given for TestRandomBrowse(), run 3.

Returns:
Filename written.

char* clTestRandomBrowse::WriteXMLErrorFile1 (  )  [protected]

Writes a parameter file where the browse probabilities are not all between 0 and 1.

Returns:
Filename written.


The documentation for this class was generated from the following file:

Generated on Tue Apr 19 14:06:02 2011 for SORTIE C++ Test Documentation by  doxygen 1.5.6