SORTIE C++ Test Documentation
Public Member Functions | Private Member Functions | List of all members
clTestGrowthOrg Class Reference

Tests the clGrowthOrg object. More...

#include <TestGrowthOrg.h>

Inheritance diagram for clTestGrowthOrg:

Public Member Functions

void TestGrowthOrg ()
 Combines the testing into one behavior.
 

Private Member Functions

void TestNormalProcessingRun1 (clSimManager *p_oSimManager)
 Tests normal processing.
 
void TestNormalProcessingRun2 (clSimManager *p_oSimManager)
 Tests to make sure that precedence requests are properly met when diameter and HeightIncrementers need to go in different orders.
 
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
 
const char * WriteXMLFile1 ()
 Writes a parameter file to direct testing.
 
const char * WriteXMLFile2 ()
 Writes a parameter file to direct testing for normal processing run 2.
 
const char * WriteXMLErrorFile1 ()
 Writes a parameter file to direct testing for an intentionally triggered error.
 
const char * WriteXMLErrorFile2 ()
 Writes a parameter file to direct testing for an intentionally triggered error.
 

Detailed Description

Tests the clGrowthOrg object.

This specifically makes sure that auto-update diameter growth and separate diameter-height growth updating work correctly. The individual growth behaviors are tested elsewhere.

Member Function Documentation

void clTestGrowthOrg::TestErrorProcessing ( clSimManager *  p_oSimManager)
private

Tests error processing.

WriteXMLErrorFile1() and WriteXMLErrorFile2() are used to introduce runs with error conditions in growth setup.

Parameters
p_oSimManagerSim manager object for doing the runs.
void clTestGrowthOrg::TestGrowthOrg ( )

Combines the testing into one behavior.

void clTestGrowthOrg::TestNormalProcessingRun1 ( clSimManager *  p_oSimManager)
private

Tests normal processing.

WriteXMLFile1() is used to create the file for this run. Then six trees are added - a seedling, sapling, and species of each of Species 1 and Species 2. Both the diameter and height of each tree are set to known values. Then growth is run. The diameter and height for each tree are checked against expected values.

Parameters
p_oSimManagerSim manager object for doing the run.
void clTestGrowthOrg::TestNormalProcessingRun2 ( clSimManager *  p_oSimManager)
private

Tests to make sure that precedence requests are properly met when diameter and HeightIncrementers need to go in different orders.

WriteXMLFile2() creates the file. There are four species with each possible combination of possible precedence. One tree of each species is created; growth is run; and the results are checked.

Parameters
p_oSimManagerSim manager object for doing the run.
const char* clTestGrowthOrg::WriteXMLErrorFile1 ( )
private

Writes a parameter file to direct testing for an intentionally triggered error.

This file contains a tree species/type combo that has a diameter- only growth behavior without a corresponding height-only growth behavior.

Returns
Filename written.
const char* clTestGrowthOrg::WriteXMLErrorFile2 ( )
private

Writes a parameter file to direct testing for an intentionally triggered error.

This file contains a tree species/type combo that has a height- only growth behavior without a corresponding diameter-only growth behavior.

Returns
Filename written.
const char* clTestGrowthOrg::WriteXMLFile1 ( )
private

Writes a parameter file to direct testing.

This contains two species, with either constant basal area or constant radial growth assigned, with both auto-update and diameter and height increment setting done separately.

Returns
Filename written.
const char* clTestGrowthOrg::WriteXMLFile2 ( )
private

Writes a parameter file to direct testing for normal processing run 2.

This contains four species, with each one being assigned a diameter-height growth behavior combination that checks all possible precedence request situations.

Returns
Filename written.

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