2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2021-04-28 16:18:59 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "googletest.h"
|
|
|
|
|
|
|
|
|
|
#include "sqlitedatabasemock.h"
|
|
|
|
|
|
2021-09-16 17:19:56 +02:00
|
|
|
#include <projectstorage/filestatus.h>
|
|
|
|
|
#include <projectstorage/projectstorageinterface.h>
|
2021-05-06 12:26:39 +02:00
|
|
|
#include <projectstorage/sourcepathcache.h>
|
2021-04-28 16:18:59 +02:00
|
|
|
|
2021-09-16 17:19:56 +02:00
|
|
|
class ProjectStorageMock : public QmlDesigner::ProjectStorageInterface
|
2021-04-28 16:18:59 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2022-07-12 15:01:24 +02:00
|
|
|
MOCK_METHOD(void,
|
|
|
|
|
synchronize,
|
|
|
|
|
(QmlDesigner::Storage::Synchronization::SynchronizationPackage package),
|
|
|
|
|
(override));
|
2021-04-28 16:18:59 +02:00
|
|
|
|
2022-08-09 17:36:42 +02:00
|
|
|
MOCK_METHOD(QmlDesigner::ModuleId, moduleId, (Utils::SmallStringView), (const, override));
|
2021-10-11 11:15:47 +02:00
|
|
|
|
2021-09-16 17:19:56 +02:00
|
|
|
MOCK_METHOD(QmlDesigner::FileStatus,
|
|
|
|
|
fetchFileStatus,
|
|
|
|
|
(QmlDesigner::SourceId sourceId),
|
|
|
|
|
(const, override));
|
2021-04-28 16:18:59 +02:00
|
|
|
|
2022-07-12 15:01:24 +02:00
|
|
|
MOCK_METHOD(QmlDesigner::Storage::Synchronization::ProjectDatas,
|
2021-10-19 14:42:28 +02:00
|
|
|
fetchProjectDatas,
|
2021-09-16 17:19:56 +02:00
|
|
|
(QmlDesigner::SourceId sourceId),
|
|
|
|
|
(const, override));
|
2021-04-28 16:18:59 +02:00
|
|
|
|
2021-09-16 17:19:56 +02:00
|
|
|
MOCK_METHOD(QmlDesigner::SourceContextId,
|
|
|
|
|
fetchSourceContextId,
|
|
|
|
|
(Utils::SmallStringView SourceContextPath),
|
|
|
|
|
());
|
|
|
|
|
MOCK_METHOD(QmlDesigner::SourceId,
|
|
|
|
|
fetchSourceId,
|
|
|
|
|
(QmlDesigner::SourceContextId SourceContextId, Utils::SmallStringView sourceName),
|
|
|
|
|
());
|
|
|
|
|
MOCK_METHOD(QmlDesigner::SourceContextId,
|
|
|
|
|
fetchSourceContextIdUnguarded,
|
|
|
|
|
(Utils::SmallStringView SourceContextPath),
|
|
|
|
|
());
|
|
|
|
|
MOCK_METHOD(QmlDesigner::SourceId,
|
|
|
|
|
fetchSourceIdUnguarded,
|
|
|
|
|
(QmlDesigner::SourceContextId SourceContextId, Utils::SmallStringView sourceName),
|
|
|
|
|
());
|
|
|
|
|
MOCK_METHOD(Utils::PathString,
|
|
|
|
|
fetchSourceContextPath,
|
|
|
|
|
(QmlDesigner::SourceContextId sourceContextId));
|
|
|
|
|
MOCK_METHOD(QmlDesigner::Cache::SourceNameAndSourceContextId,
|
|
|
|
|
fetchSourceNameAndSourceContextId,
|
|
|
|
|
(QmlDesigner::SourceId sourceId));
|
|
|
|
|
MOCK_METHOD(std::vector<QmlDesigner::Cache::SourceContext>, fetchAllSourceContexts, (), ());
|
|
|
|
|
MOCK_METHOD(std::vector<QmlDesigner::Cache::Source>, fetchAllSources, (), ());
|
2021-04-28 16:18:59 +02:00
|
|
|
};
|
|
|
|
|
|