SORTIE C++ Test Documentation
Public Member Functions | Protected Member Functions | List of all members
clTestMerchValueCalculator Class Reference

Tests the class clMerchValueCalculator. More...

#include <TestMerchValueCalculator.h>

Inheritance diagram for clTestMerchValueCalculator:

Public Member Functions

void TestMerchValueCalculator ()
 Performs all the tests from one function.
 

Protected Member Functions

void TestNormalProcessing (clSimManager *p_oSimManager)
 Tests normal processing.
 
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
 
const char * WriteXMLFile1 ()
 Writes a parameter file for normal processing.
 
const char * WriteXMLErrorFile1 ()
 Writes an error file where a form class value is not an allowed value.
 
const char * WriteXMLErrorFile2 ()
 Writes an error file where the volume behavior is applied to seedlings.
 
void WriteCommonStuff (std::fstream &oOut)
 Writes common portions of the test parameter files (tree pop, plot, etc).
 

Detailed Description

Tests the class clMerchValueCalculator.

Member Function Documentation

void clTestMerchValueCalculator::TestErrorProcessing ( clSimManager *  p_oSimManager)
protected

Tests error processing.

This uses the WriteXMLErrorFileX files to introduce errors and make sure that they are caught.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestMerchValueCalculator::TestMerchValueCalculator ( )

Performs all the tests from one function.

void clTestMerchValueCalculator::TestNormalProcessing ( clSimManager *  p_oSimManager)
protected

Tests normal processing.

WriteXMLFile1() does setup. Then 33 trees of each of 6 species are created. A simulation is run for one timestep then the value checked for all those trees, as well as the species totals. Then all trees are killed, a second timestep is run, and the species total values are checked to make sure they equal 0.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestMerchValueCalculator::WriteCommonStuff ( std::fstream &  oOut)
protected

Writes common portions of the test parameter files (tree pop, plot, etc).

Ends with </trees&gt.

Parameters
oOutFile stream to write to.
const char* clTestMerchValueCalculator::WriteXMLErrorFile1 ( )
protected

Writes an error file where a form class value is not an allowed value.

Returns
Filename written.
const char* clTestMerchValueCalculator::WriteXMLErrorFile2 ( )
protected

Writes an error file where the volume behavior is applied to seedlings.

Returns
Filename written.
const char* clTestMerchValueCalculator::WriteXMLFile1 ( )
protected

Writes a parameter file for normal processing.

There are 7 species (of which 6 are used), and the merchantable timber value behavior is the only one in the run.

Returns
Filename written.

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