Definition at line 52 of file AsyncFizzClientTest.cpp.
Definition at line 145 of file AsyncFizzClientTest.cpp.
References testing::_, fizz::client::detail::actions(), folly::netops::connect(), folly::IOBuf::copyBuffer(), EXPECT_CALL, EXPECT_FALSE, testing::InvokeWithoutArgs(), fizz::client::ReportEarlyHandshakeSuccess::maxEarlyDataSize, folly::gen::move, and params.
149 auto addParamsToState =
153 ReportEarlyHandshakeSuccess reportSuccess;
154 reportSuccess.maxEarlyDataSize = 1000;
virtual void readBufferAvailable(std::unique_ptr< IOBuf >) noexcept
constexpr detail::Map< Move > move
MockHandshakeCallbackT< MockClientStateMachineInstance > handshakeCallback_
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
constexpr Params params[]
AsyncTransportWrapper::ReadCallback * socketReadCallback_
MockClientStateMachineInstance * machine_
Actions actions(Args &&...act)
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
AsyncFizzClientT< MockClientStateMachineInstance >::UniquePtr client_
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
void fizz::client::test::AsyncFizzClientTest::completeHandshake |
( |
| ) |
|
|
inlineprotected |
Definition at line 131 of file AsyncFizzClientTest.cpp.
References folly::netops::connect(), and EXPECT_CALL.
void fullHandshakeSuccess(bool acceptEarlyData, std::string alpn="h2", std::shared_ptr< const Cert > clientCert=nullptr, std::shared_ptr< const Cert > serverCert=nullptr, bool pskResumed=false)
MockHandshakeCallbackT< MockClientStateMachineInstance > handshakeCallback_
#define EXPECT_CALL(obj, call)
void fizz::client::test::AsyncFizzClientTest::connect |
( |
| ) |
|
|
inlineprotected |
Definition at line 89 of file AsyncFizzClientTest.cpp.
References testing::_, EXPECT_CALL, testing::InvokeWithoutArgs(), sni, and string.
void expectTransportReadCallback()
MockHandshakeCallbackT< MockClientStateMachineInstance > handshakeCallback_
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
std::vector< Action > Actions
folly::Optional< std::string > pskIdentity_
MockClientStateMachineInstance * machine_
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
AsyncFizzClientT< MockClientStateMachineInstance >::UniquePtr client_
void fizz::client::test::AsyncFizzClientTest::expectAppClose |
( |
| ) |
|
|
inlineprotected |
Definition at line 74 of file AsyncFizzClientTest.cpp.
References testing::_, fizz::client::detail::actions(), fizz::WriteToSocket::contents, fizz::TLSContent::contentType, folly::IOBuf::copyBuffer(), fizz::TLSContent::data, fizz::TLSContent::encryptionLevel, fizz::client::Error, EXPECT_CALL, fizz::Handshake, fizz::handshake, testing::InvokeWithoutArgs(), folly::gen::move, fizz::test::State::state(), and fizz::detail::write().
82 write.contents.emplace_back(
std::move(record));
void write(const T &in, folly::io::Appender &appender)
constexpr detail::Map< Move > move
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
MockClientStateMachineInstance * machine_
Actions actions(Args &&...act)
#define EXPECT_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)
void fizz::client::test::AsyncFizzClientTest::expectTransportReadCallback |
( |
| ) |
|
|
inlineprotected |
void fizz::client::test::AsyncFizzClientTest::fullHandshakeSuccess |
( |
bool |
acceptEarlyData, |
|
|
std::string |
alpn = "h2" , |
|
|
std::shared_ptr< const Cert > |
clientCert = nullptr , |
|
|
std::shared_ptr< const Cert > |
serverCert = nullptr , |
|
|
bool |
pskResumed = false |
|
) |
| |
|
inlineprotected |
Definition at line 97 of file AsyncFizzClientTest.cpp.
References testing::_, fizz::client::detail::actions(), alpn, clientCert, folly::IOBuf::copyBuffer(), fizz::client::ReportHandshakeSuccess::earlyDataAccepted, folly::Range< Iter >::empty(), EXPECT_CALL, testing::InvokeWithoutArgs(), folly::gen::move, folly::none, fizz::psk_ke, fizz::Resumption, serverCert, fizz::tls_1_3, and fizz::TLS_AES_128_GCM_SHA256.
105 auto addToState = [=](
State& newState) {
106 newState.exporterMasterSecret() =
111 newState.alpn() =
none;
113 newState.alpn() =
alpn;
118 if (acceptEarlyData || pskResumed) {
123 ReportHandshakeSuccess reportSuccess;
124 reportSuccess.earlyDataAccepted = acceptEarlyData;
virtual void readBufferAvailable(std::unique_ptr< IOBuf >) noexcept
constexpr detail::Map< Move > move
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
constexpr bool empty() const
AsyncTransportWrapper::ReadCallback * socketReadCallback_
std::shared_ptr< const Cert > serverCert
MockClientStateMachineInstance * machine_
Actions actions(Args &&...act)
std::shared_ptr< const Cert > clientCert
#define EXPECT_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)
static EarlyDataParams fizz::client::test::AsyncFizzClientTest::getEarlyDataParams |
( |
| ) |
|
|
inlinestaticprotected |
void fizz::client::test::AsyncFizzClientTest::SetUp |
( |
| ) |
|
|
inlineoverridevirtual |
Reimplemented from testing::Test.
Definition at line 54 of file AsyncFizzClientTest.cpp.
References fizz::client::test::MockClientStateMachineInstance::instance, folly::gen::move, ON_CALL, testing::Return(), and socket_.
55 context_ = std::make_shared<FizzClientContext>();
61 client_.reset(
new AsyncFizzClientT<MockClientStateMachineInstance>(
constexpr detail::Map< Move > move
std::unique_ptr< AsyncTransportWrapper, Destructor > UniquePtr
MockClientStateMachineInstance * machine_
#define ON_CALL(obj, call)
MockReadCallback readCallback_
std::shared_ptr< MockPskCache > mockPskCache_
AsyncFizzClientT< MockClientStateMachineInstance >::UniquePtr client_
static MockClientStateMachineInstance * instance
MockAsyncTransport * socket_
std::shared_ptr< FizzClientContext > context_
internal::ReturnAction< R > Return(R value)
EventBase fizz::client::test::AsyncFizzClientTest::evb_ |
|
protected |
std::shared_ptr<MockPskCache> fizz::client::test::AsyncFizzClientTest::mockPskCache_ |
|
protected |
The documentation for this class was generated from the following file: