chromium/third_party/anonymous_tokens/src/anonymous_tokens/cpp/client/anonymous_tokens_public_key_client_test.cc

// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "anonymous_tokens/cpp/client/anonymous_tokens_public_key_client.h"

#include <cstddef>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "anonymous_tokens/cpp/shared/proto_utils.h"
#include "anonymous_tokens/cpp/shared/status_utils.h"
#include "anonymous_tokens/cpp/testing/utils.h"
#include "anonymous_tokens/proto/anonymous_tokens.pb.h"

namespace anonymous_tokens {
namespace {

constexpr int kKeyByteSize =;
constexpr int kSaltByteLength =;
constexpr int kMessageMaskByteLength =;
constexpr absl::Duration kEndTimeIncrement =;
constexpr absl::Duration kStartTimeIncrement =;

class AnonymousTokensPublicKeysGetClientTest : public ::testing::Test {};

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       PublicKeyGetClientMoreThanOneRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       PublicKeyGetClientInvalidUseCaseRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       PublicKeyGetClientInvalidKeyVersionRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       PublicKeyGetClientExpiryBeforeValidityStartRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       PublicKeyGetClientExpiryInThePastRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       CreateAnonymousTokensPublicKeysGetRequestWithExpiryTime) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       CreateAnonymousTokensPublicKeysGetRequestWithNoExpiryTime) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       ProcessPublicKeyGetResponseWithoutCreatingRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       UndefinedUseCaseInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       UseCaseInPublicKeyGetResponseDifferentThanRequest) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       KeyVersionZeroInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       KeyVersionDifferentThanRequestedInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       SaltLengthZeroInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       SaltLengthNegativeInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       InvalidKeySizeInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       NegativeKeySizeInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       UndefinedOrUnsupportedMessageMaskType) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       MessageMaskConcatSizeLessThan32) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest, MessageMaskNoMaskSizeNotZero) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest, KeySizeIsDifferentThanRealSize) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       NoPublicKeyInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       NoValidityStartTimeInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       ValidityStartTimeAfterRequestedStartTime) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       IndefinitelyValidKeyReturnedButNotRequested) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       KeyWithExpirationTimeReturnedButIndefinitelyValidKeyWasRequested) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest, WrongExpirationTime) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest, KeyExpiredBeforeValidityStart) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest, AlreadyExpiredKey) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       DuplicateResponsesInPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest, ProcessPublicKeyGetResponse) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       ProcessPublicKeyGetResponseNoExpiry) {}

TEST_F(AnonymousTokensPublicKeysGetClientTest,
       ProcessResponseContainingMultiplePublicKeys) {}

}  // namespace
}  // namespace anonymous_tokens