65
65
* Test the creation & initialising of the indicator data
67
void testPluginInterface()
69
IndicatorsManager manager;
72
Indicator::Ptr indicator = manager.indicator("indicator-fake1");
73
QVERIFY(indicator ? true : false);
75
QCOMPARE(indicator->identifier(), QString("indicator-fake1"));
76
QCOMPARE(indicator->position(), 1);
78
// Check that the initial properties have been set.
79
QVariantMap props = indicator->indicatorProperties().toMap();
80
QCOMPARE(props.count(), 4);
81
QCOMPARE(props["busName"].toString(), QString("com.canonical.indicator.fake1"));
82
QCOMPARE(props["actionsObjectPath"].toString(), QString("/com/canonical/indicator/fake1"));
84
QCOMPARE(props["menuObjectPath"].toString(), QString("/com/canonical/indicator/fake1/phone"));
67
void testPluginInterfaceProfile1()
69
IndicatorsManager manager;
70
manager.load("test1");
72
Indicator::Ptr indicator = manager.indicator("indicator-fake1");
73
QVERIFY(indicator ? true : false);
75
QCOMPARE(indicator->identifier(), QString("indicator-fake1"));
76
QCOMPARE(indicator->position(), 1);
78
// Check that the initial properties have been set.
79
QVariantMap props = indicator->indicatorProperties().toMap();
80
QCOMPARE(props.count(), 4);
81
QCOMPARE(props["busName"].toString(), QString("com.canonical.indicator.fake1"));
82
QCOMPARE(props["actionsObjectPath"].toString(), QString("/com/canonical/indicator/fake1"));
84
QCOMPARE(props["menuObjectPath"].toString(), QString("/com/canonical/indicator/fake1/test1"));
88
* Test the creation & initialising of the indicator data
90
void testPluginInterfaceProfile2()
92
IndicatorsManager manager;
93
manager.load("test2");
95
Indicator::Ptr indicator = manager.indicator("indicator-fake1");
96
QVERIFY(indicator ? true : false);
98
QCOMPARE(indicator->identifier(), QString("indicator-fake1"));
99
QCOMPARE(indicator->position(), 1);
101
// Check that the initial properties have been set.
102
QVariantMap props = indicator->indicatorProperties().toMap();
103
QCOMPARE(props.count(), 4);
104
QCOMPARE(props["busName"].toString(), QString("com.canonical.indicator.fake1"));
105
QCOMPARE(props["actionsObjectPath"].toString(), QString("/com/canonical/indicator/fake1"));
107
QCOMPARE(props["menuObjectPath"].toString(), QString("/com/canonical/indicator/fake1/test2"));