diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-15 09:17:48 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-15 09:17:48 +0100 |
commit | a324759edfd9d3470aa4dc5a6e5e966682cd70c2 (patch) | |
tree | 9e560ebde564d62bf374f30aeb4cdd3d8414a7ca /accounts/maildir/tests/settingstest.cpp | |
parent | bf039428e22a10887e8d85a95ff5f38dc17e7ec2 (diff) | |
download | kube-a324759edfd9d3470aa4dc5a6e5e966682cd70c2.tar.gz kube-a324759edfd9d3470aa4dc5a6e5e966682cd70c2.zip |
Prepared a settingstest
Diffstat (limited to 'accounts/maildir/tests/settingstest.cpp')
-rw-r--r-- | accounts/maildir/tests/settingstest.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/accounts/maildir/tests/settingstest.cpp b/accounts/maildir/tests/settingstest.cpp new file mode 100644 index 00000000..d9983028 --- /dev/null +++ b/accounts/maildir/tests/settingstest.cpp | |||
@@ -0,0 +1,37 @@ | |||
1 | #include <QtTest> | ||
2 | #include <QDebug> | ||
3 | #include <functional> | ||
4 | |||
5 | #include "maildirsettings.h" | ||
6 | |||
7 | class SettingsTest : public QObject | ||
8 | { | ||
9 | Q_OBJECT | ||
10 | private slots: | ||
11 | |||
12 | void initTestCase() | ||
13 | { | ||
14 | // Sink::FacadeFactory::instance().resetFactory(); | ||
15 | // ResourceConfig::clear(); | ||
16 | // Sink::Log::setDebugOutputLevel(Sink::Log::Trace); | ||
17 | } | ||
18 | |||
19 | void testLoad() | ||
20 | { | ||
21 | auto accountId = "accountid"; | ||
22 | auto maildirPath = QDir::tempPath(); | ||
23 | |||
24 | MaildirSettings settings; | ||
25 | settings.setAccountIdentifier(accountId); | ||
26 | settings.setPath(maildirPath); | ||
27 | settings.save(); | ||
28 | |||
29 | //TODO ensure the maildir resource has been created | ||
30 | //TODO ensure the path has been setup correctly | ||
31 | //Ensure we can read the configuration correctly | ||
32 | //Ensure we can remove the account again | ||
33 | } | ||
34 | }; | ||
35 | |||
36 | QTEST_GUILESS_MAIN(SettingsTest) | ||
37 | #include "settingstest.moc" | ||