plc_module_test Class Reference

Inheritance diagram for plc_module_test:

test_helper List of all members.

Detailed Description

Unit test class for the plc 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 23 of file plc_test.h.

Public Member Functions

 plc_module_test ()
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 plc object.


Member Function Documentation

void plc_module_test::test_create (  )  [inline]

Test the creation of a plc 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.

Definition at line 47 of file plc_test.h.

References test_helper::get_class_by_name(), GETADDR, gl_create_object, and gl_get_property.


The documentation for this class was generated from the following file:
GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy