Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEInternalTest Class Reference

#include <GNEInternalTest.h>

Inheritance diagram for GNEInternalTest:
[legend]
Collaboration diagram for GNEInternalTest:
[legend]

Public Member Functions

void addTestSteps (const InternalTestStep *internalTestStep)
 add test steps
 
const std::map< std::string, int > & getAttributesEnum () const
 get map with attributesEnum jump steps
 
const std::map< std::string, InternalTest::ContextualMenu > & getContextualMenuOperations () const
 get map with contextual menu operation jump steps
 
const InternalTestStepgetCurrentStep () const
 get current step
 
const std::map< std::string, InternalTest::ViewPosition > & getViewPositions () const
 get map with view position pairs
 
 GNEInternalTest (const std::string &testFile)
 constructor
 
bool isRunning () const
 check if test is running
 
void runNeteditInternalTests (GNEApplicationWindow *applicationWindow)
 run netedit internal test
 
 ~GNEInternalTest ()
 destructor
 

Protected Member Functions

std::vector< std::string > cleanLines (const std::vector< std::pair< bool, std::string > > &linesRaw) const
 clear lines
 
std::map< std::string, int > parseAttributesEnumFile (const std::string filePath) const
 parse attributesEnum file
 
std::map< std::string, InternalTest::ContextualMenuparseContextualMenuOperationsFile (const std::string filePath) const
 parse attributesEnum file
 
std::map< std::string, InternalTest::ViewPositionparseViewPositionsFile (const std::string filePath) const
 parse viewPosition file
 
bool startWith (const std::string &str, const std::string &prefix) const
 check if the given string start with
 

Protected Attributes

std::map< std::string, int > myAttributesEnum
 vector with attributesEnum jump steps
 
std::map< std::string, InternalTest::ContextualMenumyContextualMenuOperations
 vector with contextual menu operation jump steps
 
size_t myCurrentStep = 0
 current step index
 
std::vector< const InternalTestStep * > myTestSteps
 test steps
 
std::map< std::string, InternalTest::ViewPositionmyViewPositions
 vector with view position pairs
 

Private Member Functions

 GNEInternalTest ()=delete
 Invalidated default constructor.
 
 GNEInternalTest (const GNEInternalTest &)=delete
 Invalidated copy constructor.
 
GNEInternalTestoperator= (const GNEInternalTest &src)=delete
 Invalidated assignment operator.
 

Private Attributes

bool myRunning = false
 flag to indicate if test is running
 

Detailed Description

Definition at line 35 of file GNEInternalTest.h.

Constructor & Destructor Documentation

◆ GNEInternalTest() [1/3]

GNEInternalTest::GNEInternalTest ( const std::string &  testFile)

constructor

Definition at line 32 of file GNEInternalTest.cpp.

◆ ~GNEInternalTest()

GNEInternalTest::~GNEInternalTest ( )

destructor

Definition at line 37 of file GNEInternalTest.cpp.

◆ GNEInternalTest() [2/3]

GNEInternalTest::GNEInternalTest ( )
privatedelete

Invalidated default constructor.

◆ GNEInternalTest() [3/3]

GNEInternalTest::GNEInternalTest ( const GNEInternalTest )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ addTestSteps()

void InternalTest::addTestSteps ( const InternalTestStep internalTestStep)
inherited

add test steps

Definition at line 93 of file InternalTest.cpp.

References InternalTest::myTestSteps.

Referenced by InternalTestStep::InternalTestStep(), InternalTestStep::InternalTestStep(), and InternalTestStep::InternalTestStep().

Here is the caller graph for this function:

◆ cleanLines()

std::vector< std::string > InternalTest::cleanLines ( const std::vector< std::pair< bool, std::string > > &  linesRaw) const
protectedinherited

clear lines

Definition at line 243 of file InternalTest.cpp.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ getAttributesEnum()

const std::map< std::string, int > & InternalTest::getAttributesEnum ( ) const
inherited

◆ getContextualMenuOperations()

const std::map< std::string, InternalTest::ContextualMenu > & InternalTest::getContextualMenuOperations ( ) const
inherited

get map with contextual menu operation jump steps

Definition at line 115 of file InternalTest.cpp.

References InternalTest::myContextualMenuOperations.

Referenced by InternalTestStep::contextualMenuOperation().

Here is the caller graph for this function:

◆ getCurrentStep()

const InternalTestStep * InternalTest::getCurrentStep ( ) const
inherited

get current step

Definition at line 99 of file InternalTest.cpp.

References InternalTest::myCurrentStep, and InternalTest::myTestSteps.

Referenced by MFXDialogBox::openModalDialog().

Here is the caller graph for this function:

◆ getViewPositions()

const std::map< std::string, InternalTest::ViewPosition > & InternalTest::getViewPositions ( ) const
inherited

get map with view position pairs

Definition at line 121 of file InternalTest.cpp.

References InternalTest::myViewPositions.

Referenced by InternalTestStep::contextualMenuOperation(), InternalTestStep::createLineShape(), InternalTestStep::createRectangledShape(), InternalTestStep::createSquaredShape(), InternalTestStep::leftClickOffset(), InternalTestStep::mouseClick(), InternalTestStep::redo(), and InternalTestStep::undo().

Here is the caller graph for this function:

◆ isRunning()

bool GNEInternalTest::isRunning ( ) const

check if test is running

Definition at line 77 of file GNEInternalTest.cpp.

References myRunning.

Referenced by GNEApplicationWindow::onCmdRunTests().

Here is the caller graph for this function:

◆ operator=()

GNEInternalTest & GNEInternalTest::operator= ( const GNEInternalTest src)
privatedelete

Invalidated assignment operator.

◆ parseAttributesEnumFile()

std::map< std::string, int > InternalTest::parseAttributesEnumFile ( const std::string  filePath) const
protectedinherited

parse attributesEnum file

Definition at line 127 of file InternalTest.cpp.

References StringUtils::isInt(), TL, StringUtils::toInt(), and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ parseContextualMenuOperationsFile()

std::map< std::string, InternalTest::ContextualMenu > InternalTest::parseContextualMenuOperationsFile ( const std::string  filePath) const
protectedinherited

parse attributesEnum file

Definition at line 158 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ parseViewPositionsFile()

std::map< std::string, InternalTest::ViewPosition > InternalTest::parseViewPositionsFile ( const std::string  filePath) const
protectedinherited

parse viewPosition file

Definition at line 208 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ runNeteditInternalTests()

void GNEInternalTest::runNeteditInternalTests ( GNEApplicationWindow applicationWindow)

run netedit internal test

Definition at line 41 of file GNEInternalTest.cpp.

References InternalTestStep::APP, GNEApplicationWindow::getViewNet(), InternalTestStep::INIT, InternalTest::myCurrentStep, myRunning, InternalTest::myTestSteps, and InternalTestStep::VIEW.

Referenced by GNEApplicationWindow::onCmdRunTests().

Here is the caller graph for this function:

◆ startWith()

bool InternalTest::startWith ( const std::string &  str,
const std::string &  prefix 
) const
protectedinherited

check if the given string start with

Definition at line 257 of file InternalTest.cpp.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

Field Documentation

◆ myAttributesEnum

std::map<std::string, int> InternalTest::myAttributesEnum
protectedinherited

vector with attributesEnum jump steps

Definition at line 106 of file InternalTest.h.

Referenced by InternalTest::getAttributesEnum(), and InternalTest::InternalTest().

◆ myContextualMenuOperations

std::map<std::string, InternalTest::ContextualMenu> InternalTest::myContextualMenuOperations
protectedinherited

vector with contextual menu operation jump steps

Definition at line 109 of file InternalTest.h.

Referenced by InternalTest::getContextualMenuOperations(), and InternalTest::InternalTest().

◆ myCurrentStep

size_t InternalTest::myCurrentStep = 0
protectedinherited

current step index

Definition at line 100 of file InternalTest.h.

Referenced by InternalTest::getCurrentStep(), and runNeteditInternalTests().

◆ myRunning

bool GNEInternalTest::myRunning = false
private

flag to indicate if test is running

Definition at line 52 of file GNEInternalTest.h.

Referenced by isRunning(), and runNeteditInternalTests().

◆ myTestSteps

std::vector<const InternalTestStep*> InternalTest::myTestSteps
protectedinherited

◆ myViewPositions

std::map<std::string, InternalTest::ViewPosition> InternalTest::myViewPositions
protectedinherited

vector with view position pairs

Definition at line 112 of file InternalTest.h.

Referenced by InternalTest::getViewPositions(), and InternalTest::InternalTest().


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