nlib
nn::nlib::testing::Environment Class Reference

Defines the SetUp and TearDown functions that inherit this class and are run globally. More...

#include "nn/nlib/testing/NTest.h"

Public Member Functions

virtual void SetUp ()
 Writes the process to execute only once before all tests.
 
virtual void TearDown ()
 Writes the process to execute only once after all tests.
 

Detailed Description

Defines the SetUp and TearDown functions that inherit this class and are run globally.

Description
Registers objects using the AddGlobalTestEnvironment function. Sample code is provided below.
class GlobalSetUpAndTearDown : public ::testing::Environment {
public:
virtual void SetUp() {
....
}
virtual void TearDown() {
....
}
};
int main(int argc, char** argv) {
....
::testing::AddGlobalTestEnvironment(new GlobalSetUpAndTearDown);
....
}

Definition at line 30 of file NTest.h.


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