summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-10 06:29:55 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-10 06:29:55 (GMT)
commit5f8d4e488ddd3479552868cf4e6428ccc8550979 (patch)
treee6b7a14265dcbaff42e4cf7e8337821228815e2b
parentfc35d720ae012a8e3fb498ff58863937836843c1 (diff)
Add autotest for send silently
-rw-r--r--autotests/attributetest.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/autotests/attributetest.cpp b/autotests/attributetest.cpp
index 779049e..1da9a6a 100644
--- a/autotests/attributetest.cpp
+++ b/autotests/attributetest.cpp
@@ -150,12 +150,31 @@ void AttributeTest::testSerialization()
SentBehaviourAttribute::SentBehaviour beh = SentBehaviourAttribute::MoveToCollection;
Collection::Id id = 123456789012345ll;
SentBehaviourAttribute *a = new SentBehaviourAttribute(beh, Collection(id));
+ bool sendSilently = true;
+ a->setSendSilently(sendSilently);
QByteArray data = a->serialized();
delete a;
a = new SentBehaviourAttribute;
a->deserialize(data);
QCOMPARE(beh, a->sentBehaviour());
QCOMPARE(id, a->moveToCollection().id());
+ QCOMPARE(sendSilently, a->sendSilently());
+ delete a;
+ }
+
+ {
+ SentBehaviourAttribute::SentBehaviour beh = SentBehaviourAttribute::MoveToCollection;
+ Collection::Id id = 123456789012345ll;
+ SentBehaviourAttribute *a = new SentBehaviourAttribute(beh, Collection(id));
+ bool sendSilently = true;
+ a->setSendSilently(sendSilently);
+ QByteArray data = a->serialized();
+ delete a;
+ a = new SentBehaviourAttribute;
+ a->deserialize(data);
+ QCOMPARE(beh, a->sentBehaviour());
+ QCOMPARE(id, a->moveToCollection().id());
+ QCOMPARE(sendSilently, a->sendSilently());
delete a;
}