2
* Copyright (C) 2016 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authors: James Henstridge <james.henstridge@canonical.com>
21
#include <unity/storage/provider/ProviderBase.h>
22
#include <unity/storage/provider/testing/TestServer.h>
23
#include <utils/DBusEnvironment.h>
24
#include <utils/ProviderClient.h>
26
#include <gtest/gtest.h>
27
#include <OnlineAccounts/Account>
28
#include <OnlineAccounts/Manager>
29
#include <QDBusConnection>
33
class ProviderFixture : public ::testing::Test
37
virtual ~ProviderFixture();
39
QDBusConnection const& connection() const;
40
void set_provider(std::unique_ptr<unity::storage::provider::ProviderBase>&& provider);
41
void wait_for(QDBusPendingCall const& call);
42
QString bus_path() const;
45
std::unique_ptr<DBusEnvironment> dbus_;
46
std::unique_ptr<QDBusConnection> service_connection_;
47
std::unique_ptr<OnlineAccounts::Manager> account_manager_;
48
std::unique_ptr<unity::storage::provider::testing::TestServer> test_server_;