blob: 4ede5889a9f88c1f94689d9573895de6eeee0e58 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/third_party/quiche/src/quic/tools/quic_simple_crypto_server_stream_helper.h"
6
7#include "net/third_party/quiche/src/quic/core/quic_utils.h"
8#include "net/third_party/quiche/src/quic/platform/api/quic_test.h"
9#include "net/third_party/quiche/src/quic/test_tools/mock_random.h"
10#include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h"
11
12namespace quic {
13
14class QuicSimpleCryptoServerStreamHelperTest : public QuicTest {};
15
16TEST_F(QuicSimpleCryptoServerStreamHelperTest, GenerateConnectionIdForReject) {
17 test::MockRandom random;
18 QuicSimpleCryptoServerStreamHelper helper(&random);
19
20 EXPECT_EQ(QuicUtils::CreateRandomConnectionId(&random),
21 helper.GenerateConnectionIdForReject(QUIC_VERSION_99,
22 test::TestConnectionId()));
23}
24
25} // namespace quic