mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-20 12:21:37 -05:00
f3fbac7d77
serialiser: added tests for rsconfigitems added regression reporting for tlvrandom_test fixed rstatusitem_tests fixed tlvbase_test2 tests, any fix rstlvipaddrv4 from this revision should not break regression git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4320 b45a01b8-16f6-495d-af2f-9b41ad6348cc
75 lines
1.7 KiB
C++
75 lines
1.7 KiB
C++
/*
|
|
* libretroshare/src/tests/services Service_Test.h
|
|
*
|
|
* RetroShare Service Testing
|
|
*
|
|
* Copyright 2010 by Chris Evi-Parker.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License Version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
* USA.
|
|
*
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
*
|
|
*/
|
|
|
|
|
|
#ifndef SERVICE_TEST_H_
|
|
#define SERVICE_TEST_H_
|
|
|
|
#include "pqi/p3connmgr.h"
|
|
#include "rsserver/p3peers.h"
|
|
#include "dbase/cachestrapper.h"
|
|
#include "pqi/pqipersongrp.h"
|
|
|
|
|
|
|
|
|
|
/*!
|
|
* A convenience class from which tests derive from
|
|
* This enables user to test in shallow manner the public methods
|
|
* of a service
|
|
*/
|
|
class ServiceTest {
|
|
|
|
public:
|
|
ServiceTest();
|
|
virtual ~ServiceTest();
|
|
|
|
/*!
|
|
* all tests of service should be implemented here
|
|
*/
|
|
virtual void runTests() = 0;
|
|
|
|
/*!
|
|
* use this to populate the service with messages
|
|
*/
|
|
void sendItem(RsItem* item);
|
|
|
|
protected:
|
|
|
|
|
|
p3ConnectMgr* mConnMgr;
|
|
CacheStrapper *mCs;
|
|
CacheTransfer *mCt;
|
|
p3Peers* mPeers;
|
|
pqipersongrp* mPersonGrp;
|
|
|
|
std::string fakePeer; // ssl id of fake receiving peer
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SERVICE_TEST_H_ */
|