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

Classes

class  MockBroadcastHandler
 

Public Member Functions

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

Protected Attributes

DefaultPipeline::Ptr pipeline
 
StrictMock< MockBytesToBytesHandler > * prevHandler {nullptr}
 
StrictMock< MockByteToMessageDecoder< std::string > > * decoder {nullptr}
 
StrictMock< MockBroadcastHandler > * handler {nullptr}
 
StrictMock< MockSubscriber< std::string, std::string > > subscriber0
 
StrictMock< MockSubscriber< std::string, std::string > > subscriber1
 

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 23 of file BroadcastHandlerTest.cpp.

Member Function Documentation

void BroadcastHandlerTest::SetUp ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 36 of file BroadcastHandlerTest.cpp.

References testing::_, wangle::Pipeline< R, W >::create(), EXPECT_CALL, handler(), testing::Invoke(), and fizz::detail::read().

36  {
39  .WillRepeatedly(Invoke([&](MockBytesToBytesHandler::Context* ctx,
40  IOBufQueue& q) { ctx->fireRead(q); }));
41 
44 
45  pipeline = DefaultPipeline::create();
46  pipeline->addBack(
48  pipeline->addBack(
50  decoder));
51  pipeline->addBack(
52  std::shared_ptr<StrictMock<MockBroadcastHandler>>(handler));
53  pipeline->finalize();
54  }
StrictMock< MockBroadcastHandler > * handler
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
size_t read(T &out, folly::io::Cursor &cursor)
Definition: Types-inl.h:258
StrictMock< MockByteToMessageDecoder< std::string > > * decoder
DefaultPipeline::Ptr pipeline
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
StrictMock< MockBytesToBytesHandler > * prevHandler
void BroadcastHandlerTest::TearDown ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 56 of file BroadcastHandlerTest.cpp.

56  {
57  Mock::VerifyAndClear(&subscriber0);
58  Mock::VerifyAndClear(&subscriber1);
59 
60  pipeline.reset();
61  }
StrictMock< MockSubscriber< std::string, std::string > > subscriber0
StrictMock< MockSubscriber< std::string, std::string > > subscriber1
DefaultPipeline::Ptr pipeline

Member Data Documentation

StrictMock<MockByteToMessageDecoder<std::string> >* BroadcastHandlerTest::decoder {nullptr}
protected

Definition at line 67 of file BroadcastHandlerTest.cpp.

StrictMock<MockBroadcastHandler>* BroadcastHandlerTest::handler {nullptr}
protected

Definition at line 68 of file BroadcastHandlerTest.cpp.

DefaultPipeline::Ptr BroadcastHandlerTest::pipeline
protected

Definition at line 64 of file BroadcastHandlerTest.cpp.

StrictMock<MockBytesToBytesHandler>* BroadcastHandlerTest::prevHandler {nullptr}
protected

Definition at line 66 of file BroadcastHandlerTest.cpp.

StrictMock<MockSubscriber<std::string, std::string> > BroadcastHandlerTest::subscriber0
protected

Definition at line 70 of file BroadcastHandlerTest.cpp.

StrictMock<MockSubscriber<std::string, std::string> > BroadcastHandlerTest::subscriber1
protected

Definition at line 71 of file BroadcastHandlerTest.cpp.


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