aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-14 17:37:09 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-14 17:37:09 +0000
commit8c4067b5484a81e2bb9158266601e30262bfb119 (patch)
tree11903c9a14e26e3247e9ad4dc9444db686d32ffe /tests
parent9f3136ba1c79020c10e58fa53e87a84bcce7dc29 (diff)
parent462e8e6d8e46475ea3222056f65ff40823e9e0bf (diff)
downloadayatana-indicator-datetime-8c4067b5484a81e2bb9158266601e30262bfb119.tar.gz
ayatana-indicator-datetime-8c4067b5484a81e2bb9158266601e30262bfb119.tar.bz2
ayatana-indicator-datetime-8c4067b5484a81e2bb9158266601e30262bfb119.zip
Don't use EDS if we're in the greeter. Fixes: 1256130
Diffstat (limited to 'tests')
-rw-r--r--tests/planner-mock.h29
-rw-r--r--tests/test-planner.cpp2
2 files changed, 9 insertions, 22 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;
};
diff --git a/tests/test-planner.cpp b/tests/test-planner.cpp
index 4694cf5..8f1590c 100644
--- a/tests/test-planner.cpp
+++ b/tests/test-planner.cpp
@@ -24,7 +24,7 @@
#include <datetime/clock-mock.h>
#include <datetime/date-time.h>
#include <datetime/planner.h>
-#include <datetime/planner-eds.h>
+#include <datetime/planner-range.h>
#include <langinfo.h>
#include <locale.h>