| 1 |
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#include "test_calldayscheduleitem.h" |
| 6 |
|
| 7 |
#include "../testscheduledata.h" |
| 8 |
|
| 9 |
#include <QPainter> |
| 10 |
|
| 11 |
//test_CAlldayscheduleitem::test_CAlldayscheduleitem() |
| 12 |
//{ |
| 13 |
//} |
| 14 |
|
| 15 |
//void test_CAlldayscheduleitem::SetUp() |
| 16 |
//{ |
| 17 |
// m_rectF.setRect(0, 0, 200, 50); |
| 18 |
// m_allItem = new CAllDayScheduleItem(m_rectF); |
| 19 |
//} |
| 20 |
|
| 21 |
//void test_CAlldayscheduleitem::TearDown() |
| 22 |
//{ |
| 23 |
// delete m_allItem; |
| 24 |
// m_allItem = nullptr; |
| 25 |
//} |
| 26 |
|
| 27 |
////paintBackground |
| 28 |
//TEST_F(test_CAlldayscheduleitem, paintBackground) |
| 29 |
//{ |
| 30 |
// m_allItem->setData(TestDataInfo::getScheduleItemDInfo().first()); |
| 31 |
// QPixmap pixmap(m_rectF.toRect().size()); |
| 32 |
// pixmap.fill(Qt::transparent); |
| 33 |
// QPainter painter(&pixmap); |
| 34 |
// m_allItem->setPressSchedule(TestDataInfo::getScheduleItemDInfo().first()); |
| 35 |
// m_allItem->m_vSelectflag = true; |
| 36 |
// m_allItem->paintBackground(&painter, pixmap.rect(), true); |
| 37 |
// m_allItem->m_vHoverflag = true; |
| 38 |
// m_allItem->m_vSelectflag = false; |
| 39 |
// m_allItem->paintBackground(&painter, pixmap.rect(), true); |
| 40 |
//} |
| 41 |
|
| 42 |
////hasSelectSchedule |
| 43 |
//TEST_F(test_CAlldayscheduleitem, hasSelectSchedule) |
| 44 |
//{ |
| 45 |
// m_allItem->setData(TestDataInfo::getScheduleItemDInfo().first()); |
| 46 |
|
| 47 |
// bool hasSelectInfo = m_allItem->hasSelectSchedule(TestDataInfo::getScheduleItemDInfo().first()); |
| 48 |
// ASSERT_TRUE(hasSelectInfo); |
| 49 |
//} |