File indexing completed on 2024-05-12 05:40:52
0001 /*************************************************************************** 0002 * Copyright (C) 2011 by Renaud Guezennec * 0003 * http://renaudguezennec.homelinux.org/accueil,3.html * 0004 * * 0005 * Rolisteam is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 0019 ***************************************************************************/ 0020 #include "controller/view_controller/notecontroller.h" 0021 #include "rwidgets/editors/noteeditor/src/notecontainer.h" 0022 #include "rwidgets/editors/noteeditor/src/textedit.h" 0023 0024 #include "test_root_path.h" 0025 #include "worker/iohelper.h" 0026 #include <QClipboard> 0027 #include <QGuiApplication> 0028 #include <QtTest/QtTest> 0029 #include <helper.h> 0030 #include <memory> 0031 0032 class NoteEditTest : public QObject 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 NoteEditTest(); 0038 0039 private slots: 0040 void init(); 0041 0042 // void containerTest(); 0043 0044 void editTest(); 0045 0046 private: 0047 std::unique_ptr<NoteContainer> m_container; 0048 std::unique_ptr<NoteController> m_ctrl; 0049 std::unique_ptr<TextEdit> m_edit; 0050 }; 0051 0052 NoteEditTest::NoteEditTest() {} 0053 0054 void NoteEditTest::init() 0055 { 0056 m_ctrl.reset(new NoteController()); 0057 m_container.reset(new NoteContainer(m_ctrl.get())); 0058 m_edit.reset(new TextEdit(m_ctrl.get())); 0059 } 0060 0061 /*void NoteEditTest::containerTest() 0062 { 0063 // m_container->setTitle(Helper::randomString()); 0064 }*/ 0065 0066 void NoteEditTest::editTest() 0067 { 0068 // m_edit-> 0069 } 0070 0071 QTEST_MAIN(NoteEditTest); 0072 0073 #include "tst_noteedittest.moc"