Debian Codegraph @

src/plugins/schedulers/tj/tests/TJSchedulerTester.h

raw
1 /* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2021 Dag Andersen <[email protected]>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7 #ifndef KPlato_TJSchedulerTester_h
8 #define KPlato_TJSchedulerTester_h
9
10 #include <QObject>
11
12 class PlanTJScheduler;
13
14 namespace KPlato
15 {
16 class Node;
17 class Part;
18 class MainDocument;
19 class SchedulerPlugin;
20 class SchedulingContext;
21
22 class TJSchedulerTester : public QObject
23 {
24 Q_OBJECT
25 private Q_SLOTS:
26 void init();
27 void cleanup();
28 void testSingleProject();
29 void testSingleProjectWithBookings();
30 void testMultiple();
31 void testMultipleWithBookingsParalell();
32 void testMultipleWithBookingsSequential();
33 void testRecalculate();
34 void testRecalculateMultiple();
35
36 void testRecalculateMultipleSeq();
37
38 private:
39 void populateSchedulingContext(SchedulingContext &context, const QString &name, const QList<Part*> &projects, const QList<Part*> &bookings = QList<Part*>()) const;
40 Part *loadDocument(const QString &dir, const QString &fname);
41
42 QList<Part*> loadDocuments(QString &dir, QList<QString> files);
43 // void testProject(const QString &fname, const KoXmlDocument &doc);
44 // void compare(const QString &fname, Node *n, long id1, long id2);
45 void deleteAll(const QList<Part*> parts);
46
47 PlanTJScheduler *m_scheduler;
48 };
49
50 } //namespace KPlato
51
52 #endif