RobotTestingFramework  2.0.1
Robot Testing Framework
FixtureManager.h
Go to the documentation of this file.
1 /*
2  * Robot Testing Framework
3  *
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 
22 #ifndef ROBOTTESTINGFRAMEWORK_FIXTUREMANAGER_H
23 #define ROBOTTESTINGFRAMEWORK_FIXTUREMANAGER_H
24 
27 
28 #include <string>
29 
30 namespace robottestingframework {
31 
36 {
37 public:
45  virtual void fixtureCollapsed(TestMessage reason) = 0;
46 };
47 
48 
64 {
65 public:
72  FixtureManager(std::string param = "");
73 
82  std::string param = "");
83 
87  virtual ~FixtureManager();
88 
96  bool setup();
97 
104  virtual bool setup(int argc, char** argv);
105 
109  virtual void tearDown();
110 
117  virtual bool check();
118 
124 
130 
137  void setParam(const std::string param);
138 
144  std::string getParam();
145 
146 private:
147  std::string param;
149 };
150 
151 } // namespace robottestingframework
152 
153 #endif // ROBOTTESTINGFRAMEWORK_FIXTUREMANAGER_H
virtual void fixtureCollapsed(TestMessage reason)=0
fixtureCollapsed is called by a fixture manager to inform the test suite that the corresponding fixtu...
The FixtureManager can be used to to setup any fixture which is required for the tests before executi...
FixtureManager(FixtureEvents *dispatcher, std::string param="")
FixtureManager constructor The parameter string is parsed into (argc/argv) format and will be passed ...
virtual void tearDown()
tearDown is called after to stop the fixture manager
virtual ~FixtureManager()
FixtureManager destructor.
std::string getParam()
getParam gets the original parameter string which is set for the fixture manager
virtual bool check()
check if the fixture is okay.
FixtureManager(std::string param="")
FixtureManager constructor The parameter string is parsed into (argc/argv) format and will be passed ...
virtual bool setup(int argc, char **argv)
setup is called to start the fixture manager
bool setup()
setup is called by a test suite.
void setDispatcher(FixtureEvents *dispatcher)
setDispatcher Sets the FixtureEvents dispatcher
void setParam(const std::string param)
setParam Sets the optional parameters of the fixture manager.
FixtureEvents * getDispatcher()
getResult returns an instance of FixtureEvents dispatcher
A formated message with details.
Definition: TestMessage.h:33