Commit 4c23632f authored by Brandon Schlinker's avatar Brandon Schlinker Committed by Facebook GitHub Bot

Extend MockAsyncSocket to include observer functions

Summary: Adding `addLifecycleObserver` and `removeLifecycleObserver` to support tests.

Reviewed By: yfeldblum

Differential Revision: D27163395

fbshipit-source-id: de749b2570c71a3f98cbbc8569c2990ce2c5be0c
parent c7a95dcb
......@@ -67,6 +67,15 @@ class MockAsyncSocket : public AsyncSocket {
void setPreReceivedData(std::unique_ptr<IOBuf> data) override {
return _setPreReceivedData(data);
}
MOCK_METHOD1(
addLifecycleObserver,
void(folly::AsyncTransport::LifecycleObserver* observer));
MOCK_METHOD1(
removeLifecycleObserver,
bool(folly::AsyncTransport::LifecycleObserver* observer));
MOCK_CONST_METHOD0(
getLifecycleObservers, std::vector<AsyncTransport::LifecycleObserver*>());
};
} // namespace test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment