/*
 * Copyright (C) 2020, KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef TEST_KYVIEW_H
#define TEST_KYVIEW_H

#include <QtTest/QtTest>
#include <QObject>
#include <QApplication>
#include <QWidget>
#include "kyview.h"

// 测试类
class TestKyView : public QObject
{
    Q_OBJECT

public:
    explicit TestKyView(QObject *parent = nullptr) : QObject(parent) {}

private slots:
    // 在所有测试函数之前运行
    void initTestCase();
    
    // 在每个测试函数之前运行
    void init();
    
    // 测试构造函数
    void testConstructor();
    
    // 测试getInstance静态方法
    void testGetInstance();
    
    // 测试showList方法
    void testShowList();
    
    // 测试setWidgetUi方法
    void testSetWidgetUi();
    
    // 测试setWidgetStyle方法
    void testSetWidgetStyle();
    
    // 测试initGsetting方法
    void testInitGsetting();
    
    // 测试checkLocalName方法
    void testCheckLocalName();
    
    // 测试槽函数
    void testSlotFunctions();
    
    // 测试屏幕模式切换函数
    void testScreenModeFunctions();

    // 测试 WindowManager lambda
    void testWindowManagerLambda();

    // 测试 Gsetting lambdas
    void testGsettingLambdas();

    // 测试事件处理
    void testEvents();
    
    // 在每个测试函数之后运行
    void cleanup();
    
    // 在所有测试函数之后运行
    void cleanupTestCase();

private:
    KyView *m_kyView;
};

#endif // TEST_KYVIEW_H