proxygen
fizz::MockKeyExchange Class Reference

#include <Mocks.h>

Inheritance diagram for fizz::MockKeyExchange:
fizz::KeyExchange

Public Member Functions

 MOCK_METHOD0 (generateKeyPair, void())
 
 MOCK_CONST_METHOD0 (getKeyShare, std::unique_ptr< folly::IOBuf >())
 
 MOCK_CONST_METHOD1 (generateSharedSecret, std::unique_ptr< folly::IOBuf >(folly::ByteRange keyShare))
 
void setDefaults ()
 
- Public Member Functions inherited from fizz::KeyExchange
virtual ~KeyExchange ()=default
 
virtual void generateKeyPair ()=0
 
virtual std::unique_ptr< folly::IOBufgetKeyShare () const =0
 
virtual std::unique_ptr< folly::IOBufgenerateSharedSecret (folly::ByteRange keyShare) const =0
 

Detailed Description

Definition at line 18 of file Mocks.h.

Member Function Documentation

fizz::MockKeyExchange::MOCK_CONST_METHOD0 ( getKeyShare  ,
std::unique_ptr< folly::IOBuf () 
)
fizz::MockKeyExchange::MOCK_CONST_METHOD1 ( generateSharedSecret  ,
std::unique_ptr< folly::IOBuf folly::ByteRange keyShare 
)
fizz::MockKeyExchange::MOCK_METHOD0 ( generateKeyPair  ,
void()   
)
void fizz::MockKeyExchange::setDefaults ( )
inline

Definition at line 26 of file Mocks.h.

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

26  {
27  ON_CALL(*this, getKeyShare()).WillByDefault(InvokeWithoutArgs([]() {
28  return folly::IOBuf::copyBuffer("keyshare");
29  }));
31  .WillByDefault(InvokeWithoutArgs(
32  []() { return folly::IOBuf::copyBuffer("sharedsecret"); }));
33  }
virtual std::unique_ptr< folly::IOBuf > getKeyShare() const =0
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
#define ON_CALL(obj, call)
const internal::AnythingMatcher _
virtual std::unique_ptr< folly::IOBuf > generateSharedSecret(folly::ByteRange keyShare) const =0
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: