#include "components/segmentation_platform/internal/database/segment_info_cache.h"
#include "base/memory/raw_ptr.h"
#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace segmentation_platform {
namespace {
const proto::SegmentId kSegmentId = …;
const proto::SegmentId kSegmentId2 = …;
const proto::SegmentId kSegmentId3 = …;
const ModelSource kDefaultModelSource = …;
const ModelSource kServerModelSource = …;
const ModelSource kUnknownModelSource = …;
proto::SegmentInfo CreateSegment(SegmentId segment_id,
ModelSource model_source) { … }
}
class SegmentInfoCacheTest : public testing::Test { … };
TEST_F(SegmentInfoCacheTest, GetSegmentInfoFromEmptyCache) { … }
TEST_F(SegmentInfoCacheTest, GetSegmentInfoFromCache) { … }
TEST_F(SegmentInfoCacheTest, GetSegmentInfoForSegmentsFromCache) { … }
TEST_F(SegmentInfoCacheTest, GetSegmentInfoForBothModelsFromCache) { … }
TEST_F(SegmentInfoCacheTest, UpdateSegmentInfo) { … }
TEST_F(SegmentInfoCacheTest, GetSegmentInfoForBothModelsWithEmptyDatabase) { … }
}