Unit test class for the Climate Module. More...
Public Member Functions | |
void | setup () |
Called by CPPUnit to ensure that any special pre-testing steps are completed before the tests are executed. | |
void | test_create () |
Test the creation of a climate object. |
Unit test class for the Climate Module.
This test class is also being developed as a sample to be used in creating tests for other modules. There are basically 3 steps to creating a CPPUnit test: 1. Write tests - create the methods of the test class that will exercise the module 2. Create test Suite - Call the CPPUnit macros that will create the suite() function which will be called by the test runner 3. Register the test suite with the CPPUnit factory. This is done by using a single macro that takes the name of the test class as a parameter.
Definition at line 29 of file test.h.
void climate_module_test::test_create | ( | ) | [inline] |
Test the creation of a climate object.
Part of this tests includes retrieving the class that this object will represent, creating the object, and testing certain post creation assumptions.
For each feature of the module that we want to test, we should create a separate test function. A function prototype is acceptable here, with the implementation of the method in a .cpp file.