Skip to content

Commit 591c582

Browse files
committed
Add ProjectDownloaderMock
1 parent f7065dd commit 591c582

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/mocks/projectdownloadermock.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#pragma once
2+
3+
#include <internal/iprojectdownloader.h>
4+
#include <gmock/gmock.h>
5+
6+
using namespace libscratchcpp;
7+
8+
class ProjectDownloaderMock : public IProjectDownloader
9+
{
10+
public:
11+
MOCK_METHOD(bool, downloadJson, (const std::string &), (override));
12+
MOCK_METHOD(bool, downloadAssets, (const std::vector<std::string> &), (override));
13+
MOCK_METHOD(void, cancel, (), (override));
14+
15+
MOCK_METHOD(void, setDownloadProgressCallback, (const std::function<void(unsigned int, unsigned int)> &), (override));
16+
17+
MOCK_METHOD(const std::string &, json, (), (const, override));
18+
MOCK_METHOD(const std::vector<std::string> &, assets, (), (const, override));
19+
MOCK_METHOD(unsigned int, downloadedAssetCount, (), (const, override));
20+
};

0 commit comments

Comments
 (0)