aboutsummaryrefslogtreecommitdiff
path: root/tests/planner-mock.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-14 17:37:00 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-14 17:37:00 +0000
commit9f3136ba1c79020c10e58fa53e87a84bcce7dc29 (patch)
treefa0c19e8e5c7f362b7a04f0ad3e6f57d96c1462c /tests/planner-mock.h
parent39d8fc602053397a3596d6d35afb5738b09b05a6 (diff)
parent35b0a3601f1d7d9f757467ffc7b909c461c2f49d (diff)
downloadayatana-indicator-datetime-9f3136ba1c79020c10e58fa53e87a84bcce7dc29.tar.gz
ayatana-indicator-datetime-9f3136ba1c79020c10e58fa53e87a84bcce7dc29.tar.bz2
ayatana-indicator-datetime-9f3136ba1c79020c10e58fa53e87a84bcce7dc29.zip
When the user clicks on a date in the calendar, update the "Upcoming Events" section to show events starting at that date. Fixes: 1290169, 1290171, 1291468
Diffstat (limited to 'tests/planner-mock.h')
-rw-r--r--tests/planner-mock.h27
1 files changed, 26 insertions, 1 deletions
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 <datetime/planner.h>
+#include <datetime/planner-range.h>
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<std::vector<Appointment>>& appointments() { return m_appointments; }
+
+private:
+ core::Property<std::vector<Appointment>> 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<std::vector<Appointment>>& appointments() { return m_appointments; }
+
+protected:
+ void rebuild_now(){}
+
+private:
+ core::Property<std::vector<Appointment>> m_appointments;
};
+
} // namespace datetime
} // namespace indicator