Commit 67a7dd54 authored by Laurent Montel's avatar Laurent Montel 😁

Improve unit test

parent 6a75f36e
......@@ -46,5 +46,27 @@ void AttachmentPartTest::testApi()
QVERIFY( variant.isValid() );
QVERIFY( variant.canConvert<AttachmentPart::Ptr>() );
QVERIFY( variant.value<AttachmentPart::Ptr>() == part );
}
void AttachmentPartTest::shouldHaveDefaultValue()
{
AttachmentPart part;
QCOMPARE(part.size(), (qint64)-1);
QVERIFY(!part.isInline());
QVERIFY(part.isAutoEncoding());
QVERIFY(!part.isCompressed());
QVERIFY(!part.isEncrypted());
QVERIFY(!part.isSigned());
QCOMPARE(part.encoding(), KMime::Headers::CE7Bit);
QVERIFY(!part.url().isValid());
QVERIFY(part.name().isEmpty());
QVERIFY(part.fileName().isEmpty());
QVERIFY(part.description().isEmpty());
QVERIFY(part.charset().isEmpty());
QVERIFY(part.mimeType().isEmpty());
QVERIFY(part.data().isEmpty());
}
......@@ -26,6 +26,7 @@ class AttachmentPartTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void shouldHaveDefaultValue();
void testApi();
};
......
Markdown is supported
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