diff options
Diffstat (limited to 'examples/mailtransportresource/tests/mailtransporttest.cpp')
-rw-r--r-- | examples/mailtransportresource/tests/mailtransporttest.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/examples/mailtransportresource/tests/mailtransporttest.cpp b/examples/mailtransportresource/tests/mailtransporttest.cpp index 564b4cb..f1190a7 100644 --- a/examples/mailtransportresource/tests/mailtransporttest.cpp +++ b/examples/mailtransportresource/tests/mailtransporttest.cpp | |||
@@ -26,11 +26,6 @@ class MailtransportTest : public QObject | |||
26 | resource.setProperty("testmode", true); | 26 | resource.setProperty("testmode", true); |
27 | return resource; | 27 | return resource; |
28 | } | 28 | } |
29 | |||
30 | void removeResourceFromDisk(const QByteArray &identifier) | ||
31 | { | ||
32 | // ::MailtransportResource::removeFromDisk(identifier); | ||
33 | } | ||
34 | QByteArray mResourceInstanceIdentifier; | 29 | QByteArray mResourceInstanceIdentifier; |
35 | 30 | ||
36 | private slots: | 31 | private slots: |
@@ -39,13 +34,10 @@ private slots: | |||
39 | { | 34 | { |
40 | Test::initTest(); | 35 | Test::initTest(); |
41 | Log::setDebugOutputLevel(Sink::Log::Trace); | 36 | Log::setDebugOutputLevel(Sink::Log::Trace); |
42 | // resetTestEnvironment(); | ||
43 | auto resource = createResource(); | 37 | auto resource = createResource(); |
44 | QVERIFY(!resource.identifier().isEmpty()); | 38 | QVERIFY(!resource.identifier().isEmpty()); |
45 | VERIFYEXEC(Store::create(resource)); | 39 | VERIFYEXEC(Store::create(resource)); |
46 | mResourceInstanceIdentifier = resource.identifier(); | 40 | mResourceInstanceIdentifier = resource.identifier(); |
47 | // mCapabilities = resource.getProperty("capabilities").value<QByteArrayList>(); | ||
48 | qWarning() << "FOooooooooooooooooooo"; | ||
49 | } | 41 | } |
50 | 42 | ||
51 | void cleanup() | 43 | void cleanup() |
@@ -56,9 +48,6 @@ private slots: | |||
56 | 48 | ||
57 | void init() | 49 | void init() |
58 | { | 50 | { |
59 | // qDebug(); | ||
60 | // qDebug() << "-----------------------------------------"; | ||
61 | // qDebug(); | ||
62 | // VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); | 51 | // VERIFYEXEC(ResourceControl::start(mResourceInstanceIdentifier)); |
63 | } | 52 | } |
64 | 53 | ||
@@ -74,13 +63,10 @@ private slots: | |||
74 | VERIFYEXEC(Store::create(mail)); | 63 | VERIFYEXEC(Store::create(mail)); |
75 | VERIFYEXEC(ResourceControl::flushMessageQueue(QByteArrayList() << mResourceInstanceIdentifier)); | 64 | VERIFYEXEC(ResourceControl::flushMessageQueue(QByteArrayList() << mResourceInstanceIdentifier)); |
76 | VERIFYEXEC(Store::synchronize(Query::ResourceFilter(mResourceInstanceIdentifier))); | 65 | VERIFYEXEC(Store::synchronize(Query::ResourceFilter(mResourceInstanceIdentifier))); |
66 | VERIFYEXEC(ResourceControl::inspect<ApplicationDomain::Mail>(ResourceControl::Inspection::ExistenceInspection(mail, true))); | ||
77 | 67 | ||
78 | //TODO verify the mail has been sent | 68 | auto sentMail = Store::readOne<ApplicationDomain::Mail>(Query::IdentityFilter(mail).request<Mail::Sent>()); |
79 | 69 | QVERIFY(sentMail.getSent()); | |
80 | // auto modifiedMail = Store::readOne<ApplicationDomain::Mail>(Query::IdentityFilter(mail)); | ||
81 | // VERIFYEXEC(Store::modify(modifiedMail)); | ||
82 | // VERIFYEXEC(ResourceControl::flushMessageQueue(QByteArrayList() << mResourceInstanceIdentifier)); | ||
83 | // VERIFYEXEC(ResourceControl::flushReplayQueue(QByteArrayList() << mResourceInstanceIdentifier)); | ||
84 | 70 | ||
85 | } | 71 | } |
86 | 72 | ||