File indexing completed on 2024-05-26 04:52:30
0001 /**************************************************************************************** 0002 * Copyright (c) 2009 Manuel Campomanes <campomanes.manuel@gmail.com> * 0003 * Copyright (c) 2009 Nathan Sala <sala.nathan@gmail.com> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) any later * 0008 * version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License along with * 0015 * this program. If not, see <http://www.gnu.org/licenses/>. * 0016 ****************************************************************************************/ 0017 0018 #include "TestSimilarArtistsEngine.h" 0019 0020 #include "context/engines/similarartists/SimilarArtistsEngine.h" 0021 #include "core/support/Components.h" 0022 #include "EngineController.h" 0023 0024 #include <QTest> 0025 0026 QTEST_MAIN( TestSimilarArtistsEngine ) 0027 0028 TestSimilarArtistsEngine::TestSimilarArtistsEngine(QObject* parent) 0029 : QObject(parent) 0030 { 0031 0032 } 0033 0034 void 0035 TestSimilarArtistsEngine::initTestCase() 0036 { 0037 //apparently the engine controller is needed somewhere, or we will get a crash... 0038 EngineController *controller = new EngineController(); 0039 Amarok::Components::setEngineController( controller ); 0040 bool invoked = QMetaObject::invokeMethod( controller, "initializePhonon", Qt::DirectConnection ); 0041 Q_ASSERT( invoked ); 0042 0043 //Write here initializations 0044 QList<QVariant> args; 0045 m_engine = new SimilarArtistsEngine(0, args); 0046 } 0047 0048 0049 void 0050 TestSimilarArtistsEngine::testDataEngineMethod() 0051 { 0052 //Tests on the engine 0053 QVERIFY(1 == 1); 0054 } 0055 0056 void 0057 TestSimilarArtistsEngine::cleanupTestCase() 0058 { 0059 //Write here cleaning 0060 delete m_engine; 0061 } 0062