summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-27 14:42:12 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-27 14:42:12 (GMT)
commit01fb120923cbedca87b5d8a38716b3dc4dd57e50 (patch)
treeb0b0b288a12089d91cedcdf2cd77b9196d598a51 /tests
parentbc341515687bce404b2bb9aedecf1d4caa314f59 (diff)
parent8d558ddfb088f817773d0aa214d047bbbf8fcede (diff)
downloadlibkolabxml-01fb120923cbedca87b5d8a38716b3dc4dd57e50.tar.gz
Merge branch 'master' of ssh://git.kolabsys.com/git/libkolabxml
Diffstat (limited to 'tests')
-rw-r--r--tests/bindingstest.cpp29
-rw-r--r--tests/bindingstest.h1
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/bindingstest.cpp b/tests/bindingstest.cpp
index b742ac5..6391666 100644
--- a/tests/bindingstest.cpp
+++ b/tests/bindingstest.cpp
@@ -105,6 +105,35 @@ void BindingsTest::snippetConfigurationCompletness()
QCOMPARE(re.snippets(), snippets);
}
+void BindingsTest::tagConfigurationCompletness()
+{
+ Kolab::Tag tag("name1", "type1");
+ tag.setColor("color");
+ tag.setIconName("icon");
+ tag.setParent("parent");
+ tag.setPriority(3);
+ std::vector<std::string> members;
+ members.push_back("member1");
+ members.push_back("member2");
+ tag.setMembers(members);
+
+ Kolab::Configuration configuration(tag);
+ configuration.setUid("uid");
+ configuration.setCreated(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
+ configuration.setLastModified(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
+
+ const std::string &result = Kolab::writeConfiguration(configuration);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+// std::cout << result << std::endl;
+ const Kolab::Configuration &re = Kolab::readConfiguration(result, false);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+ QCOMPARE(re.uid(), configuration.uid());
+ QCOMPARE(re.created(), configuration.created());
+ QCOMPARE(re.lastModified(), configuration.lastModified());
+ QCOMPARE(re.type(), Kolab::Configuration::TypeTag);
+ QCOMPARE(re.tag(), tag);
+}
+
void BindingsTest::noteCompletness()
{
Kolab::Note note;
diff --git a/tests/bindingstest.h b/tests/bindingstest.h
index 18a33a7..a262817 100644
--- a/tests/bindingstest.h
+++ b/tests/bindingstest.h
@@ -25,6 +25,7 @@ class BindingsTest : public QObject
void categorycolorConfigurationCompletness();
void dictionaryConfigurationCompletness();
void snippetConfigurationCompletness();
+ void tagConfigurationCompletness();
void noteCompletness();
void fileCompletness();
void eventCompletness();