blob: 0efdfae057b277f453aec2b604f216a4d9b153f3 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2016-2017. 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#pragma once
9
10#include <Commands/Command.h>
11
12namespace frc {
13
14class MockCommand : public Command {
15 public:
16 MockCommand();
17 int32_t GetInitializeCount() { return m_initializeCount; }
18 bool HasInitialized();
19
20 int32_t GetExecuteCount() { return m_executeCount; }
21 int32_t GetIsFinishedCount() { return m_isFinishedCount; }
22 bool IsHasFinished() { return m_hasFinished; }
23 void SetHasFinished(bool hasFinished) { m_hasFinished = hasFinished; }
24 int32_t GetEndCount() { return m_endCount; }
25 bool HasEnd();
26
27 int32_t GetInterruptedCount() { return m_interruptedCount; }
28 bool HasInterrupted();
29
30 protected:
31 void Initialize() override;
32 void Execute() override;
33 bool IsFinished() override;
34 void End() override;
35 void Interrupted() override;
36
37 private:
38 int32_t m_initializeCount;
39 int32_t m_executeCount;
40 int32_t m_isFinishedCount;
41 bool m_hasFinished;
42 int32_t m_endCount;
43 int32_t m_interruptedCount;
44};
45
46} // namespace frc