File indexing completed on 2025-01-05 04:58:39

0001 #include <QTest>
0002 
0003 #include <tests/mailtest.h>
0004 
0005 #include "common/test.h"
0006 #include "common/domain/applicationdomaintype.h"
0007 
0008 using namespace Sink;
0009 using namespace Sink::ApplicationDomain;
0010 
0011 /**
0012  * Test of complete system using the maildir resource.
0013  *
0014  * This test requires the maildir resource installed.
0015  */
0016 class MaildirMailTest : public Sink::MailTest
0017 {
0018     Q_OBJECT
0019 
0020     QTemporaryDir tempDir;
0021     QString targetPath;
0022 
0023 protected:
0024     void resetTestEnvironment() Q_DECL_OVERRIDE
0025     {
0026         targetPath = tempDir.path() + "/maildir1/";
0027     }
0028 
0029     Sink::ApplicationDomain::SinkResource createResource() Q_DECL_OVERRIDE
0030     {
0031         auto resource = ApplicationDomain::MaildirResource::create("account1");
0032         resource.setProperty("path", targetPath);
0033         return resource;
0034     }
0035 };
0036 
0037 QTEST_MAIN(MaildirMailTest)
0038 
0039 #include "maildirmailtest.moc"