Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Pim
Commits
67a7dd54
Commit
67a7dd54
authored
Nov 28, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve unit test
parent
6a75f36e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
messagecore/tests/attachmentparttest.cpp
messagecore/tests/attachmentparttest.cpp
+22
-0
messagecore/tests/attachmentparttest.h
messagecore/tests/attachmentparttest.h
+1
-0
No files found.
messagecore/tests/attachmentparttest.cpp
View file @
67a7dd54
...
...
@@ -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
());
}
messagecore/tests/attachmentparttest.h
View file @
67a7dd54
...
...
@@ -26,6 +26,7 @@ class AttachmentPartTest : public QObject
{
Q_OBJECT
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
void
testApi
();
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment