2010-10-28 15:22:13 -04:00
|
|
|
/*
|
2011-06-17 16:57:58 -04:00
|
|
|
* libretroshare/src/tests/services Service_Test.cc
|
2010-10-28 15:22:13 -04:00
|
|
|
*
|
|
|
|
* 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".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-06-17 16:57:58 -04:00
|
|
|
#include "servicetest.h"
|
|
|
|
#include "pqi/pqisslpersongrp.h"
|
2010-10-28 15:22:13 -04:00
|
|
|
|
|
|
|
|
2011-06-17 16:57:58 -04:00
|
|
|
ServiceTest::ServiceTest()
|
2010-10-28 15:22:13 -04:00
|
|
|
{
|
|
|
|
|
2011-06-17 16:57:58 -04:00
|
|
|
mConnMgr = new p3ConnectMgr();
|
2015-06-17 04:49:43 -04:00
|
|
|
#error secpolicy was removed, should remove it from tests too
|
2011-06-17 16:57:58 -04:00
|
|
|
SecurityPolicy *none = secpolicy_create();
|
|
|
|
mPersonGrp = new pqisslpersongrp(none, NULL);
|
|
|
|
mPeers = new p3Peers(mConnMgr);
|
2011-06-22 17:38:26 -04:00
|
|
|
|
|
|
|
mConnMgr->addFriend(fakePeer);
|
2011-06-17 16:57:58 -04:00
|
|
|
}
|
2010-10-28 15:22:13 -04:00
|
|
|
|
2011-06-17 16:57:58 -04:00
|
|
|
ServiceTest::~ServiceTest()
|
|
|
|
{
|
|
|
|
// release resources
|
|
|
|
delete mConnMgr;
|
|
|
|
delete mPersonGrp;
|
|
|
|
delete mPeers;
|
2010-10-28 15:22:13 -04:00
|
|
|
}
|
2011-06-17 16:57:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|