// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Installer/ChunkEvictionPolicy.h" #include "Common/StatsCollector.h" #if WITH_DEV_AUTOMATION_TESTS namespace BuildPatchServices { class FMockChunkEvictionPolicy : public IChunkEvictionPolicy { public: typedef TTuple, int32, TSet, TSet> FQuery; public: virtual void Query(const TMap>& CurrentMap, int32 DesiredMax, TSet& OutCleanable, TSet& OutBootable) const override { OutCleanable = Cleanable; OutBootable = Bootable; RxQuery.Emplace(FStatsCollector::GetSeconds(), CurrentMapToKeySet(CurrentMap), DesiredMax, OutCleanable, OutBootable); } public: TSet CurrentMapToKeySet(const TMap>& CurrentMap) const { TArray Result; CurrentMap.GetKeys(Result); return TSet(MoveTemp(Result)); } public: TSet Cleanable; TSet Bootable; mutable TArray RxQuery; }; } #endif //WITH_DEV_AUTOMATION_TESTS