ACF $AcfVersion:0$
CIdocCompTest.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QObject>
7#include <QtTest/QtTest>
8
9// ACF includes
10#include <idoc/ITextDocument.h>
11#include <idoc/IUndoManager.h>
14#include <GeneratedFiles/DocumentManagementComponentTest/CDocumentManagementComponentTest.h>
15
16class CIdocCompTest: public QObject
17{
18 Q_OBJECT
19private slots:
20 void initTestCase();
21
22 // Tests for CTextDocumentComp
23 void testTextDocumentCreation();
24 void testTextDocumentGetSet();
25 void testTextDocumentDefaultText();
26 void testTextDocumentSerialization();
27
28 // Tests for CSerializedUndoManagerComp
29 void testUndoManagerCreation();
30 void testUndoManagerUndoRedo();
31 void testUndoManagerMultipleSteps();
32 void testUndoManagerMaxBufferSize();
33 void testUndoManagerReset();
34 void testUndoManagerStateComparison();
35
36 // Tests for CSingleDocumentTemplateComp
37 void testDocumentTemplateCreation();
38 void testDocumentTemplateCreateDocument();
39 void testDocumentTemplateAttributes();
40
41 void cleanupTestCase();
42
43private:
44 std::shared_ptr<CDocumentManagementComponentTest> m_testInstanceCompPtr;
45
46 idoc::ITextDocument* m_textDocumentPtr = nullptr;
47 idoc::ITextDocument* m_textDocumentWithDefaultPtr = nullptr;
48 idoc::IUndoManager* m_undoManagerPtr = nullptr;
49 idoc::IUndoManager* m_undoManagerSmallBufferPtr = nullptr;
50 idoc::IDocumentTemplate* m_documentTemplatePtr = nullptr;
51};
Common interface for a document template.
Simple interface for a text document.
Interface providing UNDO/REDO functionality.