UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChunkStore.mock.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "Data/ChunkData.h"
7#include "Tests/TestHelpers.h"
8
9#if WITH_DEV_AUTOMATION_TESTS
10
11namespace BuildPatchServices
12{
13 class FMockChunkStore
14 : public IChunkStore
15 {
16 public:
21
22 public:
23 virtual void Put(const FGuid& DataId, TUniquePtr<IChunkDataAccess> ChunkData) override
24 {
25 RxPut.Emplace(FStatsCollector::GetSeconds(), DataId);
26 }
27
28 virtual IChunkDataAccess* Get(const FGuid& DataId) override
29 {
30 RxGet.Emplace(FStatsCollector::GetSeconds(), nullptr, DataId);
31 return nullptr;
32 }
33
34 virtual TUniquePtr<IChunkDataAccess> Remove(const FGuid& DataId) override
35 {
36 RxRemove.Emplace(FStatsCollector::GetSeconds(), DataId);
38 }
39
40 virtual int32 GetSize() const override
41 {
42 RxGetSize.Emplace(FStatsCollector::GetSeconds(), INDEX_NONE);
43 return INDEX_NONE;
44 }
45
46 virtual void SetLostChunkCallback(TFunction<void(const FGuid&)> Callback) override
47 {
48 MOCK_FUNC_NOT_IMPLEMENTED("FMockChunkStore::SetLostChunkCallback");
49 }
50
51 public:
52 mutable TArray<FPut> RxPut;
53 mutable TArray<FGet> RxGet;
56 };
57}
58
59#endif //WITH_DEV_AUTOMATION_TESTS
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Array.h:670
Definition AndroidPlatformMisc.h:14
Definition UniquePtr.h:107
Definition BuildPatchFileConstructor.h:28
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
Definition Guid.h:109
Definition Tuple.h:652