OTest2
A C++ testing framework
|
Go to the documentation of this file.
20 #ifndef OTest2INCLUDE_CASEGENERATED_H_
21 #define OTest2INCLUDE_CASEGENERATED_H_
57 const std::string& name_);
65 virtual std::string
getName()
const;
82 const std::string& name_)
const override;
95 const std::string& name_,
104 const std::string& name_);
virtual std::string getName() const
Get object's name.
CaseGenerated & operator=(const CaseGenerated &)=delete
virtual void tearDownObject(const Context &context_, int index_) override
Execute tear-down function at specified index.
virtual const Context & otest2Context() const
Get the OTest2 context.
void setEnteringState(const std::string &name_)
Set name of the entering (first) state.
virtual ~CaseGenerated()
Dtor.
Common implementation of a generated test case.
std::shared_ptr< FceMarshaler > FceMarshalerPtr
std::shared_ptr< Object > ObjectPtr
Shared pointer to a testing object.
virtual StatePtr getState(const std::string &name_) const override
Get state with specified name_.
virtual bool startUpObject(const Context &context_, int index_) override
Execute start-up function at specified index.
A generic interface of objects which offers OTest2 context.
std::shared_ptr< Scenario > ScenarioPtr
Shared pointer of the scenario object.
void registerFixture(FceMarshalerPtr start_up_, FceMarshalerPtr tear_down_)
Register a pair of start-up and tear-down functions.
std::shared_ptr< State > StatePtr
Pointer to test state objects.
An ordinary case object scheduled by the CmdFirstState, CmdRunState and CmdState commands.
virtual StatePtr getFirstState() const override
Get the initial state.
CaseGenerated(const CaseGenerated &)=delete
void registerState(const std::string &name_, StatePtr state_)
Register new test state.
virtual void scheduleBody(const Context &context_, ScenarioPtr scenario_, ObjectPtr me_) override
Schedule body of the testing object.