chromium/components/policy/core/common/cloud/affiliation_unittest.cc

// Copyright 2021 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/policy/core/common/cloud/affiliation.h"

#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "components/policy/core/common/cloud/cloud_policy_core.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"

#if !BUILDFLAG(IS_CHROMEOS_ASH)
#include "components/policy/core/common/cloud/mock_user_cloud_policy_store.h"
#endif

IsEmpty;
UnorderedElementsAre;

namespace policy {

namespace {

constexpr char kAffiliationId1[] =;
constexpr char kAffiliationId2[] =;

#if !BUILDFLAG(IS_CHROMEOS_ASH)
constexpr char kNonEmptyDmToken[] =;

policy::MockCloudPolicyClient* ConnectNewMockClient(
    policy::CloudPolicyCore* core) {}
#endif

}  // namespace

TEST(CloudManagementAffiliationTest, Affiliated) {}

TEST(CloudManagementAffiliationTest, Unaffiliated) {}

TEST(CloudManagementAffiliationTest, UserIdsEmpty) {}

TEST(CloudManagementAffiliationTest, DeviceIdsEmpty) {}

TEST(CloudManagementAffiliationTest, BothIdsEmpty) {}

TEST(CloudManagementAffiliationTest, UserAffiliated) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
// Tests getting affiliation IDs from core for user.
TEST(CloudManagementAffiliationTest, GetUserAffiliationIdsFromCore_User) {}

// Tests getting affiliation IDs from core for device.
TEST(CloudManagementAffiliationTest, GetUserAffiliationIdsFromCore_Device) {}

// Tests getting affiliations IDs from core when no client.
TEST(CloudManagementAffiliationTest, GetUserAffiliationIdsFromCore_NoClient) {}

// Tests getting affiliations IDs when no policy data in store.
TEST(CloudManagementAffiliationTest,
     GetUserAffiliationIdsFromCore_NoPolicyData) {}
#endif

}  // namespace policy