chromium/components/data_sharing/internal/data_sharing_service_impl_unittest.cc

// Copyright 2023 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/data_sharing/internal/data_sharing_service_impl.h"

#include <memory>

#include "base/memory/raw_ptr.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/version_info/channel.h"
#include "components/data_sharing/internal/fake_data_sharing_sdk_delegate.h"
#include "components/data_sharing/public/data_sharing_sdk_delegate.h"
#include "components/data_sharing/public/data_sharing_service.h"
#include "components/data_sharing/public/data_sharing_ui_delegate.h"
#include "components/data_sharing/public/features.h"
#include "components/data_sharing/public/protocol/data_sharing_sdk.pb.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "components/sync/model/entity_change.h"
#include "components/sync/model/metadata_change_list.h"
#include "components/sync/protocol/collaboration_group_specifics.pb.h"
#include "components/sync/test/data_type_store_test_util.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/status/status.h"

namespace data_sharing {

namespace {

RunClosure;
Eq;

const char kGroupId[] =;
const char kEncodedGroupId[] =;
const char kTokenBlob[] =;
const char kEncodedTokenBlob[] =;

sync_pb::CollaborationGroupSpecifics MakeCollaborationGroupSpecifics(
    const GroupId& id) {}

syncer::EntityData EntityDataFromSpecifics(
    const sync_pb::CollaborationGroupSpecifics& specifics) {}

std::unique_ptr<syncer::EntityChange> EntityChangeAddFromSpecifics(
    const sync_pb::CollaborationGroupSpecifics& specifics) {}

std::unique_ptr<syncer::EntityChange> EntityChangeUpdateFromSpecifics(
    const sync_pb::CollaborationGroupSpecifics& specifics) {}

std::unique_ptr<syncer::EntityChange> EntityChangeDeleteFromSpecifics(
    const sync_pb::CollaborationGroupSpecifics& specifics) {}

MATCHER_P(HasDisplayName, expected_name, "") {}

class MockObserver : public DataSharingService::Observer {};


}  // namespace

class DataSharingServiceImplTest : public testing::Test {};

TEST_F(DataSharingServiceImplTest, ConstructionAndEmptyServiceCheck) {}

TEST_F(DataSharingServiceImplTest, GetDataSharingNetworkLoader) {}

TEST_F(DataSharingServiceImplTest, ShouldCreateGroup) {}

TEST_F(DataSharingServiceImplTest, ShouldDeleteGroup) {}

TEST_F(DataSharingServiceImplTest, ShouldReadGroup) {}

TEST_F(DataSharingServiceImplTest, ShouldReadAllGroups) {}

TEST_F(DataSharingServiceImplTest, ShouldInviteMember) {}

TEST_F(DataSharingServiceImplTest, ShouldRemoveMember) {}

TEST_F(DataSharingServiceImplTest, ShouldNotifyObserverOnGroupAddition) {}

TEST_F(DataSharingServiceImplTest, ShouldNotifyObserverOnGroupRemoval) {}

TEST_F(DataSharingServiceImplTest, ShouldNotifyObserverOnGroupChange) {}

TEST_F(DataSharingServiceImplTest, ParseAndInterceptDataSharingURL) {}

TEST_F(DataSharingServiceImplTest, GetDataSharingURL) {}

}  // namespace data_sharing