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

This class tests the spatial dispersal behavior. More...

#include <TestSpatialDispersal.h>

Inheritance diagram for clTestSpatialDispersal:

Public Member Functions

void TestSpatialDisperse ()
 Performs the total test of disperse by calling TestDispersal1 and TestDispersal2.
 

Private Member Functions

void TestDispersal1 (clSimManager *p_oSimManager)
 Creates a test suite of all the test cases in this object.
 
void TestDispersal2 (clSimManager *p_oSimManager)
 Tests spatial dispersal using the second set of conditions.
 
void VerifyXMLFile1Timestep1 (clGrid *p_oSeedGrid)
 Verifies the numbers of seeds for timestep 1 during TestDispersal1.
 
void VerifyXMLFile1Timestep2 (clGrid *p_oSeedGrid)
 Verifies the numbers of seeds for timestep 2 during TestDispersal1.
 
void VerifyXMLFile2 (clGrid *p_oSeedGrid)
 Verifies the numbers of seeds during TestDispersal2.
 
const char * WriteXMLFile1 ()
 Writes a parameter file to direct testing using the first set of testing conditions.
 
const char * WriteXMLFile2 ()
 Writes a parameter file to direct testing using the second set of testing conditions.
 

Detailed Description

This class tests the spatial dispersal behavior.

It writes out parameter files and uses them as input to perform setup; it then sets up the desired initial conditions, causes the behavior to run, then tests its output.

Two runs will be tested: one in which the timestep length is 1 year and the dimensions of the seed grid are explicitly set to 2X4 m, and one in which the timestep length is 4 years and the dimensions of the seed grid are left to default. The first parameter file is run for 2 timesteps to ensure that the seed grid is cleared between timesteps.

Member Function Documentation

void clTestSpatialDispersal::TestDispersal1 ( clSimManager *  p_oSimManager)
private

Creates a test suite of all the test cases in this object.

I'm putting it here so it will be easier to see and add new cases to.

Returns
The test suite. Tests spatial dispersal using the first set of conditions. It will cause a parameter file to be written and then passed to a clSimManager object. This object will read it. The disperse behavior is run and the contents of the seed grid examined.
Parameters
p_oSimManagerSim manager object.
void clTestSpatialDispersal::TestDispersal2 ( clSimManager *  p_oSimManager)
private

Tests spatial dispersal using the second set of conditions.

It will cause a parameter file to be written and then passed to a clSimManager object. This object will read it. The disperse behavior is run and the contents of the seed grid examined.

Parameters
p_oSimManagerSim manager object.
void clTestSpatialDispersal::TestSpatialDisperse ( )

Performs the total test of disperse by calling TestDispersal1 and TestDispersal2.

void clTestSpatialDispersal::VerifyXMLFile1Timestep1 ( clGrid *  p_oSeedGrid)
private

Verifies the numbers of seeds for timestep 1 during TestDispersal1.

void clTestSpatialDispersal::VerifyXMLFile1Timestep2 ( clGrid *  p_oSeedGrid)
private

Verifies the numbers of seeds for timestep 2 during TestDispersal1.

This checks two things: one, that the number of seeds got cleaned out during timestep cleanup, and two, that the stump was removed. (So the number of seeds for one species will be slightly different.)

void clTestSpatialDispersal::VerifyXMLFile2 ( clGrid *  p_oSeedGrid)
private

Verifies the numbers of seeds during TestDispersal2.

const char* clTestSpatialDispersal::WriteXMLFile1 ( )
private

Writes a parameter file to direct testing using the first set of testing conditions.

This contains all tree information and disperse information. It also has a tree map so we'll be dealing with a known list of trees.

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

Writes a parameter file to direct testing using the second set of testing conditions.

This contains all tree information and disperse information. It also has a tree map so we'll be dealing with a known list of trees.

Returns
Filename written.

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