KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::Testing::TestSuite Class Reference

This class holds an array of test cases and run them one by one in its Run method. More...

#include <test_suite.h>

Inheritance diagram for Kratos::Testing::TestSuite:
Collaboration diagram for Kratos::Testing::TestSuite:

Public Types

Type Definitions
typedef std::vector< TestCase * > TestCasesContainerType
 

Public Member Functions

Life Cycle
 TestSuite ()=delete
 Default constructor is deleted becuase the Name should always passed to the constructor. More...
 
 TestSuite (TestSuite const &rOther)=delete
 The TestSuite cannot be copied to avoid duplications. More...
 
 TestSuite (std::string const &Name)
 The constructor to be called. More...
 
virtual ~TestSuite ()
 Destructor. More...
 
Operators
TestSuiteoperator= (TestSuite const &rOther)=delete
 Preventing the assignment of the test suites. More...
 
Operations
void AddTestCase (TestCase *pTestCase)
 
void Reset () override
 
void ResetResult () override
 
void Run () override
 
void Profile () override
 
void Enable () override
 
void Disable () override
 
void Select () override
 
void UnSelect () override
 
Input and output
virtual std::string Info () const override
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::Testing::TestCase
 TestCase ()=delete
 TestCase cannot be created without a name. More...
 
 TestCase (TestCase const &rOther)=delete
 The TestCase cannot be copied to avoid duplications. More...
 
 TestCase (std::string const &Name)
 The constructor to be called. More...
 
virtual ~TestCase ()
 Destructor. More...
 
TestCaseoperator= (TestCase const &rOther)=delete
 Preventing the assignment of the tests. More...
 
const std::string & Name () const
 
const TestCaseResultGetResult () const
 
void SetResult (TestCaseResult const &TheResult)
 
void SetResultOutput (std::string const &TheResultOutput)
 
virtual bool IsEnabled () const
 
virtual bool IsDisabled () const
 
virtual bool IsSelected () const
 
virtual bool IsDistributedTest () const
 
virtual void Setup ()
 
virtual void TearDown ()
 

Detailed Description

This class holds an array of test cases and run them one by one in its Run method.

this class implements a composite pattern. Derived from TestCase and has an array pointers to the TestCase to be run. The Run and Profile methods are overridden to call the corresponidng methods of the TestCases.

Member Typedef Documentation

◆ TestCasesContainerType

Constructor & Destructor Documentation

◆ TestSuite() [1/3]

Kratos::Testing::TestSuite::TestSuite ( )
delete

Default constructor is deleted becuase the Name should always passed to the constructor.

◆ TestSuite() [2/3]

Kratos::Testing::TestSuite::TestSuite ( TestSuite const &  rOther)
delete

The TestSuite cannot be copied to avoid duplications.

◆ TestSuite() [3/3]

Kratos::Testing::TestSuite::TestSuite ( std::string const &  Name)
explicit

The constructor to be called.

◆ ~TestSuite()

Kratos::Testing::TestSuite::~TestSuite ( )
virtual

Destructor.

Member Function Documentation

◆ AddTestCase()

void Kratos::Testing::TestSuite::AddTestCase ( TestCase pTestCase)

◆ Disable()

void Kratos::Testing::TestSuite::Disable ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ Enable()

void Kratos::Testing::TestSuite::Enable ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ Info()

std::string Kratos::Testing::TestSuite::Info ( ) const
overridevirtual

Turn back information as a string.

Reimplemented from Kratos::Testing::TestCase.

◆ operator=()

TestSuite& Kratos::Testing::TestSuite::operator= ( TestSuite const &  rOther)
delete

Preventing the assignment of the test suites.

◆ PrintData()

void Kratos::Testing::TestSuite::PrintData ( std::ostream &  rOStream) const
overridevirtual

Print object's data.

Reimplemented from Kratos::Testing::TestCase.

◆ PrintInfo()

void Kratos::Testing::TestSuite::PrintInfo ( std::ostream &  rOStream) const
overridevirtual

Print information about this object.

Reimplemented from Kratos::Testing::TestCase.

◆ Profile()

void Kratos::Testing::TestSuite::Profile ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ Reset()

void Kratos::Testing::TestSuite::Reset ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ ResetResult()

void Kratos::Testing::TestSuite::ResetResult ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ Run()

void Kratos::Testing::TestSuite::Run ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ Select()

void Kratos::Testing::TestSuite::Select ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.

◆ UnSelect()

void Kratos::Testing::TestSuite::UnSelect ( )
overridevirtual

Reimplemented from Kratos::Testing::TestCase.


The documentation for this class was generated from the following files: