2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Henri Lampela - henri.lampela@ixonos.com
6 Jussi Laitinen - jussi.laitinen@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 #ifndef NETWORKACCESSMANAGERMOCK_H
24 #define NETWORKACCESSMANAGERMOCK_H
26 #include <QNetworkAccessManager>
27 #include <QNetworkRequest>
29 #include "networkreplymock.h"
32 class NetworkAccessManagerMock : public QNetworkAccessManager
36 NetworkAccessManagerMock(QNetworkAccessManager *manager = 0, QObject *parent = 0);
38 ~NetworkAccessManagerMock();
40 NetworkReplyMock *get(const QNetworkRequest &request);
42 void setMode(int mode);
45 enum {CORRECT, INCORRECT, DELAYED_CORRECT};
48 NetworkReplyMock *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData);
51 void finished(NetworkReplyMock *reply);
55 void generateCorrectReply();
56 void generateDelayedCorrectReply();
59 NetworkReplyMock *reply;
60 QNetworkRequest request;
64 #endif // NETWORKACCESSMANAGERMOCK_H