Skip to content

Commit de8b7c1

Browse files
committed
Add DownloaderMock
1 parent 3b0c89d commit de8b7c1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/mocks/downloadermock.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
3+
#include <internal/idownloader.h>
4+
#include <gmock/gmock.h>
5+
6+
using namespace libscratchcpp;
7+
8+
class DownloaderMock : public IDownloader
9+
{
10+
public:
11+
MOCK_METHOD(void, startDownload, (const std::string &), (override));
12+
MOCK_METHOD(void, cancel, (), (override));
13+
MOCK_METHOD(void, wait, (), (override));
14+
15+
MOCK_METHOD(bool, isCancelled, (), (const, override));
16+
MOCK_METHOD(const std::string &, text, (), (const, override));
17+
};

0 commit comments

Comments
 (0)