chromium/components/autofill/core/browser/data_model/iban_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/core/browser/data_model/iban.h"

#include <string>

#include "base/uuid.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/data_model/payments_metadata.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace autofill {

constexpr char16_t kEllipsisOneDot[] =;
constexpr char16_t kEllipsisOneSpace[] =;

// A helper function gets the IBAN value returned by
// GetIdentifierStringForAutofillDisplay(), replaces the ellipsis ('\u2006')
// with a whitespace. If `is_value_masked` is true, replace oneDot ('\u2022')
// with '*'.
// This is useful to simplify the expectations in tests.
std::u16string GetHumanReadableIbanString(const Iban& iban,
                                          bool is_value_masked) {}

void SetPrefixAndSuffix(Iban& iban,
                        const std::u16string& prefix,
                        const std::u16string& suffix) {}

TEST(IbanTest, AssignmentOperator) {}

TEST(IbanTest, ConstructLocalIban) {}

TEST(IbanTest, ConstructServerIban) {}

TEST(IbanTest, GetMetadata) {}

// Verify that we set nickname with the processed string. We replace all tabs
// and newlines with whitespace, replace multiple spaces into a single one
// and trim leading/trailing whitespace.
TEST(IbanTest, SetNickname) {}

TEST(IbanTest, SetValue) {}

TEST(IbanTest, ValuePrefixAndSuffix) {}

TEST(IbanTest, InvalidValuePrefixAndSuffix) {}

TEST(IbanTest, SetRawData) {}

TEST(IbanTest, GetUserFacingValue_LocalIban) {}

TEST(IbanTest, GetUserFacingValue_ServerIban_UnmaskNotAllowed) {}

TEST(IbanTest, GetUserFacingValue_ServerIban_RegularPrefixAndSuffix) {}

TEST(IbanTest, GetUserFacingValue_ServerIban_EmptyPrefix) {}

TEST(IbanTest, GetUserFacingValue_ServerIban_EmptySuffix) {}

TEST(IbanTest, GetUserFacingValue_ServerIban_OtherLengthOfPrefixAndSuffix) {}

TEST(IbanTest, ValidateIbanValue_ValidateOnLength) {}

TEST(IbanTest, ValidateIbanValue_ModuloOnValue) {}

TEST(IbanTest, ValidateIbanValue_ValueWithCharacter) {}

TEST(IbanTest, ValidateIbanValue_ValidateOnRegexAndCountry) {}

TEST(IbanTest, GetCountryCode) {}

TEST(IbanTest, IsIbanApplicableInCountry) {}

TEST(IbanTest, GetIbanSupportedCountry) {}

// Test that `MatchesPrefixAndSuffix()` returns the expected outcome based
// on the prefix matching when the suffix matches already.
TEST(IbanTest, MatchesPrefixAndSuffix_Prefix) {}

// Test that `MatchesPrefixAndSuffix()` returns the expected outcome based
// on the suffix matching when the prefix matches already.
TEST(IbanTest, MatchesPrefixAndSuffix_Suffix) {}

// Test that `MatchesPrefixAndSuffix()` can match local IBANs to server
// IBANs correctly based on the prefix and suffix.
TEST(IbanTest, MatchesPrefixAndSuffix_AcrossTypes) {}

}  // namespace autofill