2
* This file is part of system-settings
4
* Copyright (C) 2016 Canonical Ltd.
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License version 3, as published
8
* by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranties of
12
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13
* PURPOSE. See the GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License along
16
* with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef FAKE_TOKEN_DOWNLOADERFACTORY_H
21
#define FAKE_TOKEN_DOWNLOADERFACTORY_H
24
#include "click/tokendownloader.h"
25
#include "click/tokendownloader_factory.h"
26
#include "network/accessmanager.h"
28
#include "faketokendownloader.h"
29
#include "fakeapiclient.h"
31
using namespace UpdatePlugin;
33
class MockTokenDownloaderFactory
34
: public Click::TokenDownloaderFactory
37
virtual Click::TokenDownloader* create(Network::Manager *nam,
38
QSharedPointer<Update> update
42
Click::ApiClient *client = new MockApiClient();
43
MockTokenDownloader *d = new MockTokenDownloader(client, update);
49
QList<MockTokenDownloader* > created;
52
#endif // FAKE_TOKEN_DOWNLOADERFACTORY_H