proxygen
fizz::test::MockHandshakeContext Class Reference

#include <Mocks.h>

Inheritance diagram for fizz::test::MockHandshakeContext:
fizz::HandshakeContext

Public Member Functions

 MOCK_METHOD1 (appendToTranscript, void(const Buf &transcript))
 
 MOCK_CONST_METHOD0 (getHandshakeContext, Buf())
 
 MOCK_CONST_METHOD1 (getFinishedData, Buf(folly::ByteRange baseKey))
 
 MOCK_CONST_METHOD0 (getBlankContext, folly::ByteRange())
 
void setDefaults ()
 
- Public Member Functions inherited from fizz::HandshakeContext
virtual ~HandshakeContext ()=default
 
virtual void appendToTranscript (const Buf &transcript)=0
 
virtual Buf getHandshakeContext () const =0
 
virtual Buf getFinishedData (folly::ByteRange baseKey) const =0
 
virtual folly::ByteRange getBlankContext () const =0
 

Detailed Description

Definition at line 76 of file Mocks.h.

Member Function Documentation

fizz::test::MockHandshakeContext::MOCK_CONST_METHOD0 ( getHandshakeContext  ,
Buf()   
)
fizz::test::MockHandshakeContext::MOCK_CONST_METHOD0 ( getBlankContext  ,
folly::ByteRange()   
)
fizz::test::MockHandshakeContext::MOCK_CONST_METHOD1 ( getFinishedData  ,
Buf(folly::ByteRange baseKey)   
)
fizz::test::MockHandshakeContext::MOCK_METHOD1 ( appendToTranscript  ,
void(const Buf &transcript)   
)
void fizz::test::MockHandshakeContext::setDefaults ( )
inline

Definition at line 83 of file Mocks.h.

References testing::_, folly::IOBuf::copyBuffer(), fizz::detail::getFinishedData(), testing::InvokeWithoutArgs(), and ON_CALL.

83  {
84  ON_CALL(*this, getHandshakeContext()).WillByDefault(InvokeWithoutArgs([]() {
85  return folly::IOBuf::copyBuffer("context");
86  }));
87 
88  ON_CALL(*this, getFinishedData(_)).WillByDefault(InvokeWithoutArgs([]() {
89  return folly::IOBuf::copyBuffer("verifydata");
90  }));
91  }
virtual Buf getFinishedData(folly::ByteRange baseKey) const =0
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
virtual Buf getHandshakeContext() const =0
#define ON_CALL(obj, call)
const internal::AnythingMatcher _
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
Definition: IOBuf.h:1587

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