diff options
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" | ||