/*
* Copyright (C) 2019 ~ 2021 Uniontech Software Technology Co.,Ltd.
*
* Author:     zhengxiaokang <zhengxiaokang@uniontech.com>
*
* Maintainer: zhengxiaokang <zhengxiaokang@uniontech.com>
*
* 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
* 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 <http://www.gnu.org/licenses/>.
*/
#include "test_dayhuangliview.h"

test_dayhuangliview::test_dayhuangliview()
{
    mDayHuangLiLabel = new CDayHuangLiLabel();
}

test_dayhuangliview::~test_dayhuangliview()
{
    delete mDayHuangLiLabel;
    mDayHuangLiLabel = nullptr;
}

//void CDayHuangLiLabel::setbackgroundColor(QColor backgroundColor)
TEST_F(test_dayhuangliview, setbackgroundColor)
{
    mDayHuangLiLabel->setbackgroundColor(QColor(100, 100, 255));
}

//void CDayHuangLiLabel::setTextInfo(QColor tcolor, QFont font)
TEST_F(test_dayhuangliview, setTextInfo)
{
    mDayHuangLiLabel->setTextInfo(QColor(100, 100, 255), QFont());
}

//void CDayHuangLiLabel::setHuangLiText(QStringList vhuangli, int type)
TEST_F(test_dayhuangliview, setHuangLiText)
{
    QStringList strlist("嫁娶 入土");
    mDayHuangLiLabel->setHuangLiText(strlist, 1);
    QStringList strlist1("");
    mDayHuangLiLabel->setHuangLiText(strlist1, 2);
}

TEST_F(test_dayhuangliview, getPixmap)
{
    QStringList strlist("嫁娶 入土");
    mDayHuangLiLabel->setHuangLiText(strlist, 1);
    mDayHuangLiLabel->setbackgroundColor(QColor(100, 100, 255));
    mDayHuangLiLabel->setFixedSize(200, 50);
    QPixmap pixmap(mDayHuangLiLabel->size());
    mDayHuangLiLabel->render(&pixmap);
}
