/*
* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd.
*
* Author:     leilong  <leilong@uniontech.com>
*
* Maintainer: leilong  <leilong@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_scheduletypeeditdlg.h"

test_scheduletypeeditdlg::test_scheduletypeeditdlg()
{

}

TEST_F(test_scheduletypeeditdlg, slotEditTextChanged_001)
{
    mWidget->m_typeText = "123";
    mWidget->slotEditTextChanged("21212312312315456489512315489456123165489456123135485");
    EXPECT_EQ(mWidget->m_lineEdit->text(), "123");
}

TEST_F(test_scheduletypeeditdlg, slotEditTextChanged_002)
{
    mWidget->m_typeText = "123";
    mWidget->slotEditTextChanged("");
    EXPECT_FALSE(mWidget->getButton(1)->isEnabled());
}

TEST_F(test_scheduletypeeditdlg, slotEditTextChanged_003)
{
    mWidget->m_typeText = "123";
    mWidget->slotEditTextChanged("   ");
    EXPECT_FALSE(mWidget->getButton(1)->isEnabled());
}

TEST_F(test_scheduletypeeditdlg, slotFocusChanged_001)
{
    mWidget->m_lineEdit->setText("");
    mWidget->slotFocusChanged(false);
}

TEST_F(test_scheduletypeeditdlg, slotBtnCancel_001)
{
    mWidget->slotBtnCancel();
}

TEST_F(test_scheduletypeeditdlg, slotBtnNext_001)
{
    mWidget->slotBtnNext();
}

TEST_F(test_scheduletypeeditdlg, init_001)
{
    mWidget->init();
}

TEST_F(test_scheduletypeeditdlg, initView_001)
{
    mWidget->initView();
}

TEST_F(test_scheduletypeeditdlg, initData_001)
{
    mWidget->initData();
}
