clTestCarbonValueCalculator Class Reference

Tests the class clCarbonValueCalculator. More...

#include <TestCarbonValueCalculator.h>

List of all members.

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.
char * WriteXMLFile1 ()
 Writes the parameter file for normal processing.
char * WriteXMLErrorFile1 ()
 Writes an error file where the Dimension Analysis behavior is not enabled for all trees for carbon value.
char * WriteXMLErrorFile2 ()
 Writes an error file where the percentage of biomass that is carbon is negative.
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::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_oSimManager Sim Manager object to call for runs.

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_oSimManager Sim Manager object to call for runs.

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.

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.

char* clTestCarbonValueCalculator::WriteXMLErrorFile2 (  )  [protected]

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

Returns:
Filename written.

char* clTestCarbonValueCalculator::WriteXMLErrorFile3 (  )  [protected]

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

Returns:
Filename written.

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:
oOut File stream to write to.


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

Generated on Wed Oct 28 14:03:21 2009 for SORTIE C++ Test Documentation by  doxygen 1.5.6