File indexing completed on 2023-05-30 10:49:14
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de> 0004 // 0005 0006 0007 #include "RenderPluginModel.h" 0008 #include "MarbleMap.h" 0009 #include "TestUtils.h" 0010 0011 namespace Marble 0012 { 0013 0014 class RenderPluginModelTest : public QObject 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 RenderPluginModelTest() : 0020 m_map( nullptr ) 0021 {} 0022 0023 private Q_SLOTS: 0024 void initTestCase() { m_map = new MarbleMap(); } 0025 void cleanupTestCase() { delete m_map; } 0026 0027 void construct(); 0028 void setRenderPlugins(); 0029 0030 private: 0031 MarbleMap *m_map; 0032 }; 0033 0034 void RenderPluginModelTest::construct() 0035 { 0036 const RenderPluginModel model; 0037 0038 QCOMPARE( model.rowCount(), 0 ); 0039 } 0040 0041 void RenderPluginModelTest::setRenderPlugins() 0042 { 0043 RenderPluginModel model; 0044 model.setRenderPlugins( m_map->renderPlugins() ); 0045 0046 QCOMPARE( model.rowCount(), m_map->renderPlugins().count() ); 0047 } 0048 0049 } 0050 0051 QTEST_MAIN( Marble::RenderPluginModelTest ) 0052 0053 #include "RenderPluginModelTest.moc"