CommandMock Class Reference

#include <CommandMock.h>

Inheritance diagram for CommandMock:

Command

Detailed Description

Mock Implementation for Unit Tests

Definition at line 13 of file CommandMock.h.


Public Member Functions

 CommandMock () throw ()
 Constructor.
SUMOTime execute (SUMOTime currentTime) throw (ProcessError)
 Executes the command.
bool isExecuteCalled ()
 ~CommandMock () throw ()
 Destructor.

Private Attributes

bool hasRun

Constructor & Destructor Documentation

CommandMock::CommandMock (  )  throw () [inline]

Constructor.

Definition at line 17 of file CommandMock.h.

References hasRun.

00017                          {
00018         hasRun = false;
00019     }

CommandMock::~CommandMock (  )  throw () [inline]

Destructor.

Definition at line 22 of file CommandMock.h.

00022 {}


Member Function Documentation

SUMOTime CommandMock::execute ( SUMOTime  currentTime  )  throw (ProcessError) [inline, virtual]

Executes the command.

Implements Command.

Definition at line 25 of file CommandMock.h.

References hasRun.

00025                                                                {
00026         hasRun = true;
00027         return currentTime;
00028     } 

bool CommandMock::isExecuteCalled (  )  [inline]

return true, when execute was called, otherwise false

Definition at line 31 of file CommandMock.h.

References hasRun.

Referenced by TEST().

00031                            {
00032         return hasRun;
00033     }


Field Documentation

Definition at line 36 of file CommandMock.h.

Referenced by CommandMock(), execute(), and isExecuteCalled().


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

Generated on Wed May 5 00:06:40 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6