blob: a4d22f872d5f412aba68bd41be58d779f0612f27 [file] [log] [blame]
Brian Silverman26e4e522015-12-17 01:56:40 -05001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2014. All Rights Reserved. */
3/* Open Source Software - may be modified and shared by FRC teams. The code */
4/* must be accompanied by the FIRST BSD license file in the root directory of */
5/* the project. */
6/*----------------------------------------------------------------------------*/
7
8#include "command/MockCommand.h"
9
10MockCommand::MockCommand() {
11 m_initializeCount = 0;
12 m_executeCount = 0;
13 m_isFinishedCount = 0;
14 m_hasFinished = false;
15 m_endCount = 0;
16 m_interruptedCount = 0;
17}
18
19void MockCommand::Initialize() { ++m_initializeCount; }
20
21void MockCommand::Execute() { ++m_executeCount; }
22
23bool MockCommand::IsFinished() {
24 ++m_isFinishedCount;
25 return IsHasFinished();
26}
27
28void MockCommand::End() { ++m_endCount; }
29
30void MockCommand::Interrupted() { ++m_interruptedCount; }
31
32bool MockCommand::HasInitialized() { return GetInitializeCount() > 0; }
33
34bool MockCommand::HasEnd() { return GetEndCount() > 0; }
35
36bool MockCommand::HasInterrupted() { return GetInterruptedCount() > 0; }