summaryrefslogtreecommitdiff
path: root/tests/test-resource.h
blob: a762a8a1c81c862ca56a59677e09f74a1e6763ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef TEST_RESOURCE_H
#define TEST_RESOURCE_H

#include <QtTest/QTest>
#include "resource.h"
#include "mock-resource-library.h"

class TestResource: public QObject
{
   Q_OBJECT
private:
   ResourceLibrary *resourceLibrary;
   Resource *resource;

   bool isReservable;
   bool isReserved;
public:
   TestResource();
   ~TestResource();

public slots:
   void handleReservable();
   void handleStateChanged(enum ResourceState newState);

private slots:
   void init();

   void testInitializeSucceeds();
   void testInitializeFails();

   void testConnectToServerSucceeds();
   void testConnectToServerFails();

   void testApplicationClass();
   void testResources();

   void testReservable();

   void testReserve();
   void testReserveExpectFail();
};

#endif