aboutsummaryrefslogtreecommitdiff
path: root/tests/planner-mock.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-09 22:26:26 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-03-09 22:26:26 -0500
commit462e8e6d8e46475ea3222056f65ff40823e9e0bf (patch)
treed6538de2306f6d7a2c6b00117dfaa4dda52abc2f /tests/planner-mock.h
parent3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 (diff)
downloadayatana-indicator-datetime-462e8e6d8e46475ea3222056f65ff40823e9e0bf.tar.gz
ayatana-indicator-datetime-462e8e6d8e46475ea3222056f65ff40823e9e0bf.tar.bz2
ayatana-indicator-datetime-462e8e6d8e46475ea3222056f65ff40823e9e0bf.zip
don't connect to EDS when running in the greeter.
Diffstat (limited to 'tests/planner-mock.h')
-rw-r--r--tests/planner-mock.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/tests/planner-mock.h b/tests/planner-mock.h
index 67e550c..53109cf 100644
--- a/tests/planner-mock.h
+++ b/tests/planner-mock.h
@@ -26,23 +26,6 @@ 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.
- */
-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.
@@ -50,15 +33,19 @@ private:
class MockRangePlanner: public RangePlanner
{
public:
- MockRangePlanner() =default;
+ MockRangePlanner():
+ m_range(std::pair<DateTime,DateTime>(DateTime::NowLocal(), DateTime::NowLocal()))
+ {
+ }
+
~MockRangePlanner() =default;
- core::Property<std::vector<Appointment>>& appointments() { return m_appointments; }
-protected:
- void rebuild_now(){}
+ 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;
};