#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[] = …;
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 { … };
}
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) { … }
}