phoneplugins/infowidgetplugin/infowidgetprovider/tsrc/ut_infowidgetsathandler/src/ut_infowidgetsathandler.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneplugins/infowidgetplugin/infowidgetprovider/tsrc/ut_infowidgetsathandler/src/ut_infowidgetsathandler.cpp Fri Jun 04 10:19:18 2010 +0100
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "ut_infowidgetsathandler.h"
+#define private public
+#include "infowidgetsathandler.h"
+#include "qtestmains60.h"
+
+/*!
+ UT_InfoWidgetSatHandler::UT_InfoWidgetSatHandler
+ */
+UT_InfoWidgetSatHandler::UT_InfoWidgetSatHandler()
+ :
+ m_satHandler(0)
+{
+
+}
+
+
+/*!
+ UT_InfoWidgetSatHandler::~UT_InfoWidgetSatHandler
+ */
+UT_InfoWidgetSatHandler::~UT_InfoWidgetSatHandler()
+{
+ delete m_satHandler;
+}
+
+/*!
+ UT_InfoWidgetSatHandler::init
+ */
+void UT_InfoWidgetSatHandler::init()
+{
+ initialize();
+
+ m_satHandler = new InfoWidgetSatHandler();
+
+ QVERIFY(verify());
+}
+
+
+/*!
+ UT_InfoWidgetSatHandler::cleanup
+ */
+void UT_InfoWidgetSatHandler::cleanup()
+{
+ reset();
+
+ delete m_satHandler;
+ m_satHandler = 0;
+}
+
+
+/*!
+ UT_InfoWidgetSatHandler::t_satDisplayText
+ */
+void UT_InfoWidgetSatHandler::t_satDisplayText()
+{
+ QString satDisplayText("satDisplayText");
+ m_satHandler->setSatDisplayText(satDisplayText);
+ QVERIFY(satDisplayText == m_satHandler->satDisplayText());
+}
+
+
+/*!
+ UT_InfoWidgetSatHandler::t_setSatDisplayText
+ */
+void UT_InfoWidgetSatHandler::t_setSatDisplayText()
+{
+ QString satDisplayText("satDisplayText");
+ m_satHandler->setSatDisplayText(satDisplayText);
+
+ QVERIFY(satDisplayText == m_satHandler->satDisplayText());
+}
+
+
+/*!
+ UT_InfoWidgetSatHandler::t_logCurrentInfo
+ */
+void UT_InfoWidgetSatHandler::t_logCurrentInfo()
+{
+ m_satHandler->logCurrentInfo();
+
+ QVERIFY(verify());
+}
+
+void UT_InfoWidgetSatHandler::t_connect()
+{
+ //}else if (!connect && m_connected){
+ m_satHandler->m_connected = 1;
+ m_satHandler->connect(0);
+
+
+ m_satHandler->m_connected = 1;
+ m_satHandler->connect(1);
+
+ //if(connect && !m_connected){
+ m_satHandler->m_connected = 0;
+ m_satHandler->connect(1);
+
+ QVERIFY(verify());
+}
+void UT_InfoWidgetSatHandler::t_handleIdleModeTxtMessage()
+{
+ m_satHandler->m_connected = 0;
+ m_satHandler->handleIdleModeTxtMessage(0);
+ m_satHandler->m_connected = 1;
+ m_satHandler->handleIdleModeTxtMessage(0);
+
+ QVERIFY(verify());
+}
+void UT_InfoWidgetSatHandler::t_handleSatError()
+{
+ m_satHandler->handleSatError(1,1);
+
+ QVERIFY(verify());
+}
+
+
+QTEST_MAIN_S60(UT_InfoWidgetSatHandler)