~ted/indicator-network/add-title

« back to all changes in this revision

Viewing changes to tests/TestIndicatorNetworkService.cpp

  • Committer: Tarmac
  • Author(s): Pete Woods
  • Date: 2013-08-27 19:52:14 UTC
  • mfrom: (274.1.5 secret-agent)
  • Revision ID: tarmac-20130827195214-y2my0d0bibchvq6v
Move the secret agent code over into this package.

Approved by Charles Kerr, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 3, as published
 
6
 * by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
11
 * PURPOSE.  See the GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License along
 
14
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Author: Pete Woods <pete.woods@canonical.com>
 
17
 */
 
18
 
 
19
#include <libqtdbustest/DBusTestRunner.h>
 
20
#include <libqtdbustest/QProcessDBusService.h>
 
21
#include <libqtdbusmock/DBusMock.h>
 
22
#include <NetworkManager.h>
 
23
 
 
24
#include <gmock/gmock.h>
 
25
#include <gtest/gtest.h>
 
26
 
 
27
using namespace std;
 
28
using namespace testing;
 
29
using namespace QtDBusTest;
 
30
using namespace QtDBusMock;
 
31
 
 
32
namespace {
 
33
 
 
34
class TestIndicatorNetworkService: public Test {
 
35
protected:
 
36
        TestIndicatorNetworkService() :
 
37
                        dbusMock(dbusTestRunner) {
 
38
 
 
39
                dbusMock.registerNetworkManager();
 
40
                dbusTestRunner.startServices();
 
41
 
 
42
                DBusServicePtr indicator(
 
43
                                new QProcessDBusService("com.canonical.indicator.network",
 
44
                                                QDBusConnection::SessionBus, NETWORK_SERVICE_BIN,
 
45
                                                QStringList()));
 
46
        }
 
47
 
 
48
        virtual ~TestIndicatorNetworkService() {
 
49
        }
 
50
 
 
51
        DBusTestRunner dbusTestRunner;
 
52
 
 
53
        DBusMock dbusMock;
 
54
};
 
55
 
 
56
TEST_F(TestIndicatorNetworkService, Foo) {
 
57
        //FIXME: Port the python test
 
58
}
 
59
 
 
60
} // namespace