2017-08-09 21:19:35 +08:00
|
|
|
#ifndef MAINTEST_H
|
|
|
|
|
#define MAINTEST_H
|
|
|
|
|
|
|
|
|
|
#include <QtCore/QObject>
|
|
|
|
|
#include <QtCore/qglobal.h>
|
|
|
|
|
|
|
|
|
|
#include "weblogdatabase.h"
|
|
|
|
|
class Post;
|
2019-02-26 00:16:18 +08:00
|
|
|
class CommandsTest : public QObject
|
2017-08-09 21:19:35 +08:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
WeblogDatabase db;
|
|
|
|
|
int postId;
|
|
|
|
|
Post *post;
|
|
|
|
|
Query<Post> *q;
|
|
|
|
|
public:
|
2019-02-26 00:16:18 +08:00
|
|
|
explicit CommandsTest(QObject *parent = nullptr);
|
2017-08-09 21:19:35 +08:00
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void initTestCase();
|
|
|
|
|
|
|
|
|
|
void cmd1();
|
|
|
|
|
void cmd2();
|
2018-01-09 00:59:16 +08:00
|
|
|
void join();
|
2017-08-09 21:19:35 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // MAINTEST_H
|