From bee8e2f180d9f26f7e8260f7a3dde0016ded81fb Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 27 Jun 2016 16:58:45 +0300 Subject: [PATCH] add more tests for confighelper --- sources/test/testawconfighelper.cpp | 14 ++++++++++++++ sources/test/testawconfighelper.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/sources/test/testawconfighelper.cpp b/sources/test/testawconfighelper.cpp index 7ccffda..0f7c3a7 100644 --- a/sources/test/testawconfighelper.cpp +++ b/sources/test/testawconfighelper.cpp @@ -64,4 +64,18 @@ void TestAWConfigHelper::test_importConfiguration() } +void TestAWConfigHelper::test_readDataEngineConfiguration() +{ + deConfig = plugin->readDataEngineConfiguration(); + QVERIFY(!deConfig.isEmpty()); +} + + +void TestAWConfigHelper::test_writeDataEngineConfiguration() +{ + QVERIFY(plugin->writeDataEngineConfiguration(deConfig)); + QCOMPARE(plugin->readDataEngineConfiguration(), deConfig); +} + + QTEST_MAIN(TestAWConfigHelper); diff --git a/sources/test/testawconfighelper.h b/sources/test/testawconfighelper.h index 4f6dfdd..8591015 100644 --- a/sources/test/testawconfighelper.h +++ b/sources/test/testawconfighelper.h @@ -38,11 +38,14 @@ private slots: void test_configurationDirectory(); void test_exportConfiguration(); void test_importConfiguration(); + void test_readDataEngineConfiguration(); + void test_writeDataEngineConfiguration(); private: AWConfigHelper *plugin = nullptr; QString filename; QQmlPropertyMap map; + QVariantMap deConfig; };