FixtureManager.h
Go to the documentation of this file.
/*
* Robot Testing Framework
*
* Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ROBOTTESTINGFRAMEWORK_FIXTUREMANAGER_H
#define ROBOTTESTINGFRAMEWORK_FIXTUREMANAGER_H
#include <robottestingframework/TestMessage.h>
#include <robottestingframework/TestResult.h>
#include <string>
namespace robottestingframework {
class FixtureEvents
{
public:
virtual void fixtureCollapsed(TestMessage reason) = 0;
};
class FixtureManager
{
public:
FixtureManager(std::string param = "");
FixtureManager(FixtureEvents* dispatcher,
std::string param = "");
virtual ~FixtureManager();
bool setup();
virtual bool setup(int argc, char** argv);
virtual void tearDown();
virtual bool check();
void setDispatcher(FixtureEvents* dispatcher);
FixtureEvents* getDispatcher();
void setParam(const std::string param);
std::string getParam();
private:
std::string param;
FixtureEvents* dispatcher;
};
} // namespace robottestingframework
#endif // ROBOTTESTINGFRAMEWORK_FIXTUREMANAGER_H
TestMessage.h
TestResult.h
robottestingframework::FixtureEvents
class FixtureEvents
Definition: FixtureManager.h:36
robottestingframework::FixtureEvents::fixtureCollapsed
virtual void fixtureCollapsed(TestMessage reason)=0
fixtureCollapsed is called by a fixture manager to inform the test suite that the corresponding fixtu...
robottestingframework::FixtureManager
The FixtureManager can be used to to setup any fixture which is required for the tests before executi...
Definition: FixtureManager.h:64
robottestingframework::FixtureManager::FixtureManager
FixtureManager(FixtureEvents *dispatcher, std::string param="")
FixtureManager constructor The parameter string is parsed into (argc/argv) format and will be passed ...
robottestingframework::FixtureManager::tearDown
virtual void tearDown()
tearDown is called after to stop the fixture manager
robottestingframework::FixtureManager::~FixtureManager
virtual ~FixtureManager()
FixtureManager destructor.
robottestingframework::FixtureManager::getParam
std::string getParam()
getParam gets the original parameter string which is set for the fixture manager
robottestingframework::FixtureManager::check
virtual bool check()
check if the fixture is okay.
robottestingframework::FixtureManager::FixtureManager
FixtureManager(std::string param="")
FixtureManager constructor The parameter string is parsed into (argc/argv) format and will be passed ...
robottestingframework::FixtureManager::setup
virtual bool setup(int argc, char **argv)
setup is called to start the fixture manager
robottestingframework::FixtureManager::setup
bool setup()
setup is called by a test suite.
robottestingframework::FixtureManager::param
std::string param
Definition: FixtureManager.h:147
robottestingframework::FixtureManager::setDispatcher
void setDispatcher(FixtureEvents *dispatcher)
setDispatcher Sets the FixtureEvents dispatcher
robottestingframework::FixtureManager::dispatcher
FixtureEvents * dispatcher
Definition: FixtureManager.h:148
robottestingframework::FixtureManager::setParam
void setParam(const std::string param)
setParam Sets the optional parameters of the fixture manager.
robottestingframework::FixtureManager::getDispatcher
FixtureEvents * getDispatcher()
getResult returns an instance of FixtureEvents dispatcher
robottestingframework::TestMessage
A formated message with details.
Definition: TestMessage.h:33
robottestingframework
Definition: Arguments.h:25