aboutsummaryrefslogtreecommitdiff
path: root/tests/planner-mock.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/planner-mock.h')
-rw-r--r--tests/planner-mock.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/planner-mock.h b/tests/planner-mock.h
index 44d30c7..53109cf 100644
--- a/tests/planner-mock.h
+++ b/tests/planner-mock.h
@@ -20,22 +20,34 @@
#ifndef INDICATOR_DATETIME_PLANNER_MOCK_H
#define INDICATOR_DATETIME_PLANNER_MOCK_H
-#include <datetime/planner.h>
+#include <datetime/planner-range.h>
namespace unity {
namespace indicator {
namespace datetime {
/**
- * \brief Planner which does nothing on its own.
- * It requires its client must set its appointments property.
+ * \brief #RangePlanner which does nothing on its own.
+ * Its controller must set its appointments property.
*/
-class MockPlanner: public Planner
+class MockRangePlanner: public RangePlanner
{
public:
- MockPlanner() =default;
- virtual ~MockPlanner() =default;
+ MockRangePlanner():
+ m_range(std::pair<DateTime,DateTime>(DateTime::NowLocal(), DateTime::NowLocal()))
+ {
+ }
+
+ ~MockRangePlanner() =default;
+
+ core::Property<std::vector<Appointment>>& appointments() { return m_appointments; }
+ core::Property<std::pair<DateTime,DateTime>>& range() { return m_range; }
+
+private:
+ core::Property<std::vector<Appointment>> m_appointments;
+ core::Property<std::pair<DateTime,DateTime>> m_range;
};
+
} // namespace datetime
} // namespace indicator