clTestHarvestInterface Class Reference

Tests the class clHarvestInterface. More...

#include <TestHarvestInterface.h>

List of all members.

Public Member Functions

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

Protected Member Functions

void TestNormalProcessingRun1 (clSimManager *p_oSimManager)
 Tests normal processing, run 1.
void TestNormalProcessingRun2 (clSimManager *p_oSimManager)
 Tests normal processing, run 2.
void TestNormalProcessingRun3 (clSimManager *p_oSimManager)
 Tests normal processing, run 3.
void TestNormalProcessingRun4 (clSimManager *p_oSimManager)
 Tests normal processing, run 4.
void TestNormalProcessingRun5 (clSimManager *p_oSimManager)
 Tests normal processing, run 5.
void TestNormalProcessingRun6 (clSimManager *p_oSimManager)
 Tests normal processing, run 6.
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
char * WriteXMLFile1 ()
 Writes a parameter file for normal processing run 1.
char * WriteXMLFile2 ()
 Writes a parameter file for normal processing run 2.
char * WriteXMLFile3 ()
 Writes a parameter file for normal processing run 3.
char * WriteXMLFile4 ()
 Writes a parameter file for normal processing run 4.
char * WriteXMLFile5 ()
 Writes a parameter file for normal processing run 5.
char * WriteXMLFile6 ()
 Writes a parameter file for normal processing run 6.
char * WriteXMLBatch1 ()
 Writes batch file 1, for normal processing run 5.
char * WriteXMLErrorBatch1 ()
 Writes a batch file to provoke an error in the length of the batch parameters file.
char * WriteAllParamsFile ()
 Writes a parameters file, for normal processing run 5.
char * WriteXMLErrorFile1 ()
 Writes an error file where the harvest executable isn't where it's supposed to be.
char * WriteXMLErrorFile2 ()
 Writes an error file where the harvest period is negative.
char * WriteXMLErrorFile3 ()
 Writes an error file where requested tree attributes don't exist at all.
char * WriteXMLErrorFile4 ()
 Writes an error file where requested tree attributes don't exist for all species.
char * WriteXMLErrorFile5 ()
 Writes an error file where the harvest return file will not exist.
char * WriteXMLErrorFile6 ()
 Writes an error file where the update return file will not exist.
char * WriteXMLErrorFile7 ()
 Writes an error file where a tree to harvest will not exist.
char * WriteXMLErrorFile8 ()
 Writes an error file where a tree to update will not exist.
char * WriteXMLErrorFile9 ()
 Writes an error file where the parameter batch file is missing.
void WriteTrees (std::fstream &oOut)
 Writes the tree portions of the test parameter files, from <trees> to </trees>.
void WriteAllometry (std::fstream &oOut)
 Writes the allometry portions of the test parameter files, from <allometry> to </allometry>.


Detailed Description

Tests the class clHarvestInterface.

Member Function Documentation

void clTestHarvestInterface::TestHarvestInterface (  ) 

Performs all the tests from one function.

void clTestHarvestInterface::TestNormalProcessingRun1 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing, run 1.

WriteXMLFile1() does setup. Then 55 trees are created. Two timesteps are run. In the first, the following trees should be dead: 2, 3, 9, 15, 19, 20, 21, 22, 34, 48, 50. In the second timestep, the following trees should be dead: 1,4, 30, 31.

Parameters:
p_oSimManager Sim Manager object to call for runs.

void clTestHarvestInterface::TestNormalProcessingRun2 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing, run 2.

This tests extra columns desired in the files. WriteXMLFile2() does setup. Then 55 trees are created. Three timesteps are run. In the first, the following trees should be dead: 2, 3, 9, 15, 19, 20, 21, 22, 34, 48, 50. In the second timestep, all remaining trees are cut. The third timestep tests the situation when there are no trees.

Parameters:
p_oSimManager Sim Manager object to call for runs.

void clTestHarvestInterface::TestNormalProcessingRun3 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing, run 3.

This tests extra columns desired in the files, and new tree members to be added and updated. WriteXMLFile3() does setup.

Parameters:
p_oSimManager Sim Manager object to call for runs.

void clTestHarvestInterface::TestNormalProcessingRun4 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing, run 4.

This tests applying the behavior to only a subset of trees. WriteXMLFile4() does setup.

Parameters:
p_oSimManager Sim Manager object to call for runs.

void clTestHarvestInterface::TestNormalProcessingRun5 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing, run 5.

This tests batch running. WriteXMLBatch1() runs WriteXMLFile5() for setup.

Parameters:
p_oSimManager Sim Manager object to call for runs.

void clTestHarvestInterface::TestNormalProcessingRun6 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing, run 6.

This tests batch running with no extra parameters file. WriteXMLBatch1() runs WriteXMLFile6() for setup.

Parameters:
p_oSimManager Sim Manager object to call for runs.

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

Tests error processing.

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

Parameters:
p_oSimManager Sim Manager object to call for runs.

char* clTestHarvestInterface::WriteXMLFile1 (  )  [protected]

Writes a parameter file for normal processing run 1.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLFile2 (  )  [protected]

Writes a parameter file for normal processing run 2.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLFile3 (  )  [protected]

Writes a parameter file for normal processing run 3.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLFile4 (  )  [protected]

Writes a parameter file for normal processing run 4.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLFile5 (  )  [protected]

Writes a parameter file for normal processing run 5.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLFile6 (  )  [protected]

Writes a parameter file for normal processing run 6.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLBatch1 (  )  [protected]

Writes batch file 1, for normal processing run 5.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorBatch1 (  )  [protected]

Writes a batch file to provoke an error in the length of the batch parameters file.

Returns:
Filename written.

char* clTestHarvestInterface::WriteAllParamsFile (  )  [protected]

Writes a parameters file, for normal processing run 5.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile1 (  )  [protected]

Writes an error file where the harvest executable isn't where it's supposed to be.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile2 (  )  [protected]

Writes an error file where the harvest period is negative.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile3 (  )  [protected]

Writes an error file where requested tree attributes don't exist at all.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile4 (  )  [protected]

Writes an error file where requested tree attributes don't exist for all species.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile5 (  )  [protected]

Writes an error file where the harvest return file will not exist.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile6 (  )  [protected]

Writes an error file where the update return file will not exist.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile7 (  )  [protected]

Writes an error file where a tree to harvest will not exist.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile8 (  )  [protected]

Writes an error file where a tree to update will not exist.

Returns:
Filename written.

char* clTestHarvestInterface::WriteXMLErrorFile9 (  )  [protected]

Writes an error file where the parameter batch file is missing.

Returns:
Filename written.

void clTestHarvestInterface::WriteTrees ( std::fstream &  oOut  )  [protected]

Writes the tree portions of the test parameter files, from <trees> to </trees>.

Parameters:
oOut File stream to write to.

void clTestHarvestInterface::WriteAllometry ( std::fstream &  oOut  )  [protected]

Writes the allometry portions of the test parameter files, from <allometry> to </allometry>.

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