proxygen
EchoHandlerFixture Class Reference
Inheritance diagram for EchoHandlerFixture:
testing::Test

Public Member Functions

void SetUp () override
 
void TearDown () override
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 

Protected Attributes

EchoHandlerhandler {nullptr}
 
StrictMock< MockEchoStatsstats
 
std::unique_ptr< MockResponseHandlerresponseHandler
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
 Test ()
 
 Test ()
 

Detailed Description

Definition at line 26 of file EchoHandlerTest.cpp.

Member Function Documentation

void EchoHandlerFixture::SetUp ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 28 of file EchoHandlerTest.cpp.

References handler().

28  {
29  handler = new EchoHandler(&stats);
30  responseHandler = std::make_unique<MockResponseHandler>(handler);
32  }
EchoHandler * handler
virtual void setResponseHandler(ResponseHandler *handler) noexcept
std::unique_ptr< MockResponseHandler > responseHandler
StrictMock< MockEchoStats > stats
void EchoHandlerFixture::TearDown ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 34 of file EchoHandlerTest.cpp.

34  {
35  Mock::VerifyAndClear(&stats);
36  Mock::VerifyAndClear(responseHandler.get());
37 
38  // Since there is no easy way to verify that handler has deleted
39  // itself, its advised to run test binary under AddressSanitzer
40  // to verify that.
41  }
std::unique_ptr< MockResponseHandler > responseHandler
StrictMock< MockEchoStats > stats

Member Data Documentation

EchoHandler* EchoHandlerFixture::handler {nullptr}
protected

Definition at line 44 of file EchoHandlerTest.cpp.

std::unique_ptr<MockResponseHandler> EchoHandlerFixture::responseHandler
protected

Definition at line 46 of file EchoHandlerTest.cpp.

StrictMock<MockEchoStats> EchoHandlerFixture::stats
protected

Definition at line 45 of file EchoHandlerTest.cpp.


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