proxygen
fizz::extensions::test::TokenBindingServerExtensionTest Class Reference
Inheritance diagram for fizz::extensions::test::TokenBindingServerExtensionTest:
testing::Test

Public Member Functions

void SetUp () override
 
void setUpTokenBindingWithParameters (TokenBindingProtocolVersion version, TokenBindingKeyParameters keyParams)
 
void verifyExtensionFields (const folly::Optional< TokenBindingParameters > &actual, TokenBindingProtocolVersion expectedVersion, TokenBindingKeyParameters expectedParams)
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 

Public Attributes

TokenBindingParameters params_
 
ClientHello chlo_
 
std::shared_ptr< TokenBindingServerExtensionextensions_
 
std::shared_ptr< TokenBindingContexttokenBindingContext_
 

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 ()
 
virtual void TearDown ()
 
 Test ()
 
virtual void TearDown ()
 
 Test ()
 
virtual void TearDown ()
 

Detailed Description

Definition at line 28 of file TokenBindingServerExtensionTest.cpp.

Member Function Documentation

void fizz::extensions::test::TokenBindingServerExtensionTest::SetUp ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 30 of file TokenBindingServerExtensionTest.cpp.

30  {
31  tokenBindingContext_ = std::make_shared<TokenBindingContext>();
32  extensions_ =
33  std::make_shared<TokenBindingServerExtension>(tokenBindingContext_);
34  }
void fizz::extensions::test::TokenBindingServerExtensionTest::setUpTokenBindingWithParameters ( TokenBindingProtocolVersion  version,
TokenBindingKeyParameters  keyParams 
)
inline

Definition at line 36 of file TokenBindingServerExtensionTest.cpp.

References fizz::encodeExtension(), folly::gen::move, and version.

38  {
40  params_.key_parameters_list.push_back(keyParams);
42  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
ProtocolVersion version
TokenBindingProtocolVersion version
Definition: Types.h:42
std::vector< Extension > extensions
Definition: Types.h:193
std::vector< TokenBindingKeyParameters > key_parameters_list
Definition: Types.h:43
Extension encodeExtension(const TokenBindingParameters &params)
Definition: Types.cpp:113
void fizz::extensions::test::TokenBindingServerExtensionTest::verifyExtensionFields ( const folly::Optional< TokenBindingParameters > &  actual,
TokenBindingProtocolVersion  expectedVersion,
TokenBindingKeyParameters  expectedParams 
)
inline

Definition at line 44 of file TokenBindingServerExtensionTest.cpp.

References EXPECT_EQ, EXPECT_TRUE, and folly::Optional< Value >::hasValue().

47  {
48  EXPECT_TRUE(actual.hasValue());
49  EXPECT_EQ(actual->version, expectedVersion);
50  EXPECT_EQ(actual->key_parameters_list.size(), 1);
51  EXPECT_EQ(actual->key_parameters_list[0], expectedParams);
52  }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
FOLLY_CPP14_CONSTEXPR bool hasValue() const noexcept
Definition: Optional.h:300
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859

Member Data Documentation

ClientHello fizz::extensions::test::TokenBindingServerExtensionTest::chlo_

Definition at line 55 of file TokenBindingServerExtensionTest.cpp.

std::shared_ptr<TokenBindingServerExtension> fizz::extensions::test::TokenBindingServerExtensionTest::extensions_

Definition at line 56 of file TokenBindingServerExtensionTest.cpp.

TokenBindingParameters fizz::extensions::test::TokenBindingServerExtensionTest::params_

Definition at line 54 of file TokenBindingServerExtensionTest.cpp.

std::shared_ptr<TokenBindingContext> fizz::extensions::test::TokenBindingServerExtensionTest::tokenBindingContext_

Definition at line 57 of file TokenBindingServerExtensionTest.cpp.


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