summaryrefslogtreecommitdiffstats
path: root/accounts/maildir/tests/settingstest.cpp
blob: d9983028ed6f2a7da55cb041525736410d3efec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <QtTest>
#include <QDebug>
#include <functional>

#include "maildirsettings.h"

class SettingsTest : public QObject
{
    Q_OBJECT
private slots:

    void initTestCase()
    {
        // Sink::FacadeFactory::instance().resetFactory();
        // ResourceConfig::clear();
        // Sink::Log::setDebugOutputLevel(Sink::Log::Trace);
    }

    void testLoad()
    {
        auto accountId = "accountid";
        auto maildirPath = QDir::tempPath();

        MaildirSettings settings;
        settings.setAccountIdentifier(accountId);
        settings.setPath(maildirPath);
        settings.save();

        //TODO ensure the maildir resource has been created
        //TODO ensure the path has been setup correctly
        //Ensure we can read the configuration correctly
        //Ensure we can remove the account again
    }
};

QTEST_GUILESS_MAIN(SettingsTest)
#include "settingstest.moc"