From 3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 21:08:47 -0500 Subject: decouple the planner's states; need three separate sets: upcoming-now (for alarms in the current time), upcoming-calendar (to show events coming from the selected calendar date), and calendar-month (all the appointments in the month displayed in the menu). --- tests/planner-mock.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'tests/planner-mock.h') diff --git a/tests/planner-mock.h b/tests/planner-mock.h index 44d30c7..67e550c 100644 --- a/tests/planner-mock.h +++ b/tests/planner-mock.h @@ -20,12 +20,13 @@ #ifndef INDICATOR_DATETIME_PLANNER_MOCK_H #define INDICATOR_DATETIME_PLANNER_MOCK_H -#include +#include namespace unity { namespace indicator { namespace datetime { +#if 0 /** * \brief Planner which does nothing on its own. * It requires its client must set its appointments property. @@ -35,7 +36,31 @@ class MockPlanner: public Planner public: MockPlanner() =default; virtual ~MockPlanner() =default; + core::Property>& appointments() { return m_appointments; } + +private: + core::Property> m_appointments; +}; +#endif + +/** + * \brief #RangePlanner which does nothing on its own. + * Its controller must set its appointments property. + */ +class MockRangePlanner: public RangePlanner +{ +public: + MockRangePlanner() =default; + ~MockRangePlanner() =default; + core::Property>& appointments() { return m_appointments; } + +protected: + void rebuild_now(){} + +private: + core::Property> m_appointments; }; + } // namespace datetime } // namespace indicator -- cgit v1.2.3