• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • autotests
  • lib
testbase.h
Go to the documentation of this file.
1 /*
2  * This file is part of nepomuk-testlib
3  *
4  * Copyright (C) 2010-12 Vishesh Handa <me@vhanda.in>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 
22 #ifndef NEPOMUK_TESTBASE_H
23 #define NEPOMUK_TESTBASE_H
24 
25 #include <QtCore/QObject>
26 
27 #include "nepomuktest_export.h"
28 
29 namespace Nepomuk2 {
30 
46  class NEPOMUKTEST_EXPORT TestBase : public QObject
47  {
48  Q_OBJECT
49  public:
50 
51  TestBase(QObject* parent = 0);
52  virtual ~TestBase();
53 
54 
55  private Q_SLOTS:
56  virtual void cleanup();
57  void cleanupTest();
58 
59  protected:
60  void resetRepository();
61 
62  public Q_SLOTS:
63  QStringList availableServices();
64  QStringList runningServices();
65 
66  bool isServiceAutostarted(const QString &service);
67  bool isServiceInitialized(const QString &name);
68  bool isServiceRunning(const QString &name);
69  void setServiceAutostarted(const QString &service, bool autostart);
70 
71  bool startService(const QString &name);
72  bool stopService(const QString &name);
73 
74  void waitForServiceInitialization( const QString & service );
75  void startServiceAndWait( const QString & service );
76 
77  Q_SIGNALS:
78  void serviceInitialized(const QString &name);
79 
80  private:
81  class Private;
82  Private * d;
83  };
84 
85 }
86 
87 #endif // NEPOMUK_TESTBASE_H
nepomuktest_export.h
QObject
stopService
void stopService(const KService::Ptr &ptr)
Definition: tools/nepomukctl/main.cpp:229
startService
void startService(const KService::Ptr &ptr)
Definition: tools/nepomukctl/main.cpp:197
isServiceRunning
bool isServiceRunning(const KService::Ptr &ptr)
Definition: tools/nepomukctl/main.cpp:160
Nepomuk2::TestBase
All Nepomuk unit tests are to be derived from this class.
Definition: testbase.h:46
NEPOMUKTEST_EXPORT
#define NEPOMUKTEST_EXPORT
Definition: nepomuktest_export.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal