00001 /*************************************************************************** 00002 * Copyright (C) 2007 by Tim Sutton * 00003 * tim@linfiniti.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 #include <QtTest/QtTest> 00021 #include <omgtip.h> 00022 00023 class OmgTipTest: public QObject 00024 { 00025 Q_OBJECT; 00026 private slots: 00027 void createAndTest(); 00028 void initTestCase();// will be called before the first testfunction is executed. 00029 void cleanupTestCase();// will be called after the last testfunction was executed. 00030 void init(){};// will be called before each testfunction is executed. 00031 void cleanup(){};// will be called after every testfunction. 00032 private: 00033 }; 00034 00035 void OmgTipTest::initTestCase() 00036 { 00037 QCoreApplication::setOrganizationName("openModeller"); 00038 QCoreApplication::setOrganizationDomain("openmodeller.sf.net"); 00039 QCoreApplication::setApplicationName("OpenModellerGui"); 00040 } 00041 void OmgTipTest::cleanupTestCase() 00042 { 00043 } 00044 void OmgTipTest::createAndTest() 00045 { 00046 OmgTip myTip; 00047 myTip.setTitle("Test Tip Title"); 00048 myTip.setContent("Test Tip Content"); 00049 QVERIFY(myTip.title()=="Test Tip Title"); 00050 QVERIFY(myTip.content()=="Test Tip Content"); 00051 } 00052 00053 QTEST_MAIN(OmgTipTest) 00054 #include "moc_omgtiptest.cxx" 00055 00056 00057