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

Tests the class clCarbonValueCalculator. More...

#include <TestCarbonValueCalculator.h>

Inheritance diagram for clTestCarbonValueCalculator:

Public Member Functions

void TestCarbonValueCalculator ()
 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 the parameter file for normal processing.
 
const char * WriteXMLErrorFile1 ()
 Writes an error file where the Dimension Analysis behavior is not enabled for all trees for carbon value.
 
const char * WriteXMLErrorFile2 ()
 Writes an error file where the percentage of biomass that is carbon is negative.
 
const char * WriteXMLErrorFile3 ()
 Writes an error file where the percentage of biomass that is carbon is more than 100.
 
void WriteCommonErrorStuff (std::fstream &oOut)
 Writes common portions of the test parameter files (tree pop, plot, etc).
 

Detailed Description

Tests the class clCarbonValueCalculator.

Member Function Documentation

void clTestCarbonValueCalculator::TestCarbonValueCalculator ( )

Performs all the tests from one function.

void clTestCarbonValueCalculator::TestErrorProcessing ( clSimManager *  p_oSimManager)
protected

Tests error processing.

This uses WriteXMLErrorFileX() to introduce errors and makes sure that they are caught.

Parameters
p_oSimManagerSim Manager object to call for runs.
void clTestCarbonValueCalculator::TestNormalProcessing ( clSimManager *  p_oSimManager)
protected

Tests normal processing.

WriteXMLFile1() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the carbon and carbon value for each species. Then this kills all trees and runs another timestep to check grid reset.

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

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

This ends with </behaviorList&gt. There are only two species for this file.

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

Writes an error file where the Dimension Analysis behavior is not enabled for all trees for carbon value.

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

Writes an error file where the percentage of biomass that is carbon is negative.

Returns
Filename written.
const char* clTestCarbonValueCalculator::WriteXMLErrorFile3 ( )
protected

Writes an error file where the percentage of biomass that is carbon is more than 100.

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

Writes the parameter file for normal processing.

There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. All 18 used species use dimension analysis equation 1. The first 9 use a correction factor; the second 9 don't.

Returns
Filename written.

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