Commit 5f8d4e48 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add autotest for send silently

parent fc35d720
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment