chromium/components/segmentation_platform/internal/service_proxy_impl_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/segmentation_platform/internal/service_proxy_impl.h"
#include <memory>

#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "components/segmentation_platform/internal/constants.h"
#include "components/segmentation_platform/internal/database/test_segment_info_database.h"
#include "components/segmentation_platform/internal/execution/mock_model_provider.h"
#include "components/segmentation_platform/internal/execution/model_executor.h"
#include "components/segmentation_platform/internal/execution/processing/feature_list_query_processor.h"
#include "components/segmentation_platform/internal/platform_options.h"
#include "components/segmentation_platform/internal/scheduler/execution_service.h"
#include "components/segmentation_platform/internal/scheduler/model_execution_scheduler.h"
#include "components/segmentation_platform/internal/selection/segment_selector_impl.h"
#include "components/segmentation_platform/internal/selection/segmentation_result_prefs.h"
#include "components/segmentation_platform/public/config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Invoke;

namespace segmentation_platform {

namespace {

constexpr char kTestSegmentationKey[] =;

// Adds a segment info into a map, and return a copy of it.
proto::SegmentInfo* AddSegmentInfo(
    test::TestSegmentInfoDatabase* segment_db,
    Config* config,
    SegmentId segment_id,
    ModelSource model_source = ModelSource::SERVER_MODEL_SOURCE) {}

class MockModelExecutionScheduler : public ModelExecutionScheduler {};

class MockModelManager : public ModelManager {};

class MockModelExecutor : public ModelExecutor {};

}  // namespace

class FakeSegmentSelectorImpl : public SegmentSelectorImpl {};

class ServiceProxyImplTest : public testing::Test,
                             public ServiceProxy::Observer {};

TEST_F(ServiceProxyImplTest, GetServiceStatus) {}

TEST_F(ServiceProxyImplTest, GetSegmentationInfoFromDefaultModel) {}

TEST_F(ServiceProxyImplTest, GetSegmentationInfoFromDB) {}

TEST_F(ServiceProxyImplTest, ExecuteModel) {}

TEST_F(ServiceProxyImplTest, OverwriteResult) {}

TEST_F(ServiceProxyImplTest, SetSelectSegment) {}
}  // namespace segmentation_platform