diff -r d7fc66ccd6fb -r e44a8c097b15 vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp Mon May 03 13:01:45 2010 +0300 +++ b/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp Fri May 14 16:24:46 2010 +0300 @@ -16,74 +16,43 @@ */ // System includes -#include #include +#include // User includes #include "vmbxcpplugin.h" +#include "vmbxcpgroup.h" #include "ut_vmbxcpplugin.h" -// load plugin -#include - /*! - Ut_vmbxCpPlugin::Ut_vmbxCpPlugin - Default constructor, remember to null new members here. + Ut_vmbxCpPlugin::createSettingFormItemData */ -Ut_vmbxCpPlugin::Ut_vmbxCpPlugin() +void Ut_vmbxCpPlugin::testCreateSettingFormItemData() { - qDebug("Ut_vmbxCpPlugin::Ut_vmbxCpPlugin >"); - qDebug("Ut_vmbxCpPlugin::Ut_vmbxCpPlugin <"); -} - -/*! - Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin -*/ -Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin() -{ - qDebug("Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin >"); - qDebug("Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin <"); + CpItemDataHelper itemDataHelper; + VmbxCpPlugin *plugin = new VmbxCpPlugin(); + QVERIFY(plugin); + QList list; + list = plugin->createSettingFormItemData(itemDataHelper); + QVERIFY2(0 != list[0], "createSettingFormItemData failed"); + delete plugin; + plugin = NULL; } /*! - Ut_vmbxCpPlugin::initTestCase - QTestLib initialization method, called for each test case. + VmbxCpGroup construtor and destroctor */ -void Ut_vmbxCpPlugin::initTestCase() -{ - qDebug("Ut_vmbxCpPlugin::initTestCase >"); - mCpPlugin = new VmbxCpPlugin(); - QVERIFY(mCpPlugin); - qDebug("Ut_vmbxCpPlugin::initTestCase <"); -} - -/*! - Ut_vmbxCpPlugin::cleanupTestCase - QTestLib cleanup method, called for each test case. -*/ -void Ut_vmbxCpPlugin::cleanupTestCase() +void Ut_vmbxCpPlugin::testCreateVmbxCpGroup() { - qDebug("Ut_SatAppEngine::cleanupTestCase >"); - if ( mCpPlugin ) { - delete mCpPlugin; - qDebug("Ut_SatAppEngine::cleanupTestCase <"); - } + CpItemDataHelper itemDataHelper; + VmbxCpGroup *group = new VmbxCpGroup(itemDataHelper); + QVERIFY(group); + delete group; + group = NULL; + + group = new VmbxCpGroup(); + QVERIFY(group); + delete group; + group = NULL; } - -/*! - Ut_vmbxCpPlugin::t_createSettingFormItemData - testServiceId test case - Connects to test object signal and verifies received data. -*/ -void Ut_vmbxCpPlugin::testCreateSettingFormItemData() -{ - qDebug("Ut_vmbxCpPlugin::testCreateSettingFormItemData >"); - CpItemDataHelper itemDataHelper; - QVERIFY(mCpPlugin); - QList list; - list = mCpPlugin->createSettingFormItemData(itemDataHelper); - QVERIFY2(0 != list[0], "createSettingFormItemData failed"); - qDebug("Ut_vmbxCpPlugin::testCreateSettingFormItemData <"); -} - //End of file