File indexing completed on 2024-05-12 04:49:40
0001 /**************************************************************************************** 0002 * Copyright (c) 2012 Jasneet Singh Bhatti <jazneetbhatti@gmail.com> * 0003 * This program is free software; you can redistribute it and/or modify it under * 0004 * the terms of the GNU General Public License as published by the Free Software * 0005 * Foundation; either version 2 of the License, or (at your option) any later * 0006 * version. * 0007 * * 0008 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0009 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0010 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0011 * * 0012 * You should have received a copy of the GNU General Public License along with * 0013 * this program. If not, see <http://www.gnu.org/licenses/>. * 0014 ****************************************************************************************/ 0015 0016 #include "TestActionsCapability.h" 0017 0018 #include <core/capabilities/ActionsCapability.h> 0019 0020 0021 QTEST_MAIN( TestActionsCapability ) 0022 0023 TestActionsCapability::TestActionsCapability() 0024 { 0025 } 0026 0027 void 0028 TestActionsCapability::testActions() 0029 { 0030 QAction *action1 = new QAction( this ); 0031 QAction *action2 = new QAction( this ); 0032 QAction *action3 = new QAction( this ); 0033 QAction *action4 = new QAction( this ); 0034 QAction *action5 = new QAction( this ); 0035 0036 QList<QAction *> actions; 0037 actions<<action1<<action2<<action3<<action4<<action5; 0038 0039 Capabilities::ActionsCapability *actions_capability = new Capabilities::ActionsCapability( actions ); 0040 QVERIFY( actions_capability ); 0041 0042 QVERIFY( actions_capability->actions() == actions ); 0043 } 0044 0045 void 0046 TestActionsCapability::testCapabilityInterfaceType() 0047 { 0048 QList<QAction *> actions; 0049 0050 Capabilities::ActionsCapability *actions_capability = new Capabilities::ActionsCapability( actions ); 0051 QVERIFY( actions_capability ); 0052 0053 QVERIFY( actions_capability->capabilityInterfaceType() == Capabilities::Capability::Actions ); 0054 } 0055