File indexing completed on 2024-04-14 03:52:06

0001 /*
0002     This file is part of the kholidays library.
0003 
0004     SPDX-FileCopyrightText: 2010 John Layt <john@layt.net>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef TESTHOLIDAYREGION_H
0010 #define TESTHOLIDAYREGION_H
0011 
0012 #include <QObject>
0013 
0014 #include "holidayregion.h"
0015 
0016 class QString;
0017 class QDate;
0018 
0019 class HolidayRegionTest : public QObject
0020 {
0021     Q_OBJECT
0022 private Q_SLOTS:
0023     void testLoadFileCalendarSystems();
0024     void testLoadFile();
0025     void testGb();
0026     void testIran();
0027     void testIsrael();
0028     void testRegions();
0029     void testDefaultRegions();
0030     void testSolistaleInHolidays();
0031     void testLoadFileCalendarSystemsForPlasma();
0032     void testDominicanRepublicDiadelaConstitucion();
0033     void testUsAmericanJuneteenth();
0034 
0035 private:
0036     void printMetadata(const KHolidays::HolidayRegion &region);
0037     void printHolidays(const KHolidays::Holiday::List &holidays);
0038     void parseRegionCalendarYear(const KHolidays::HolidayRegion &region, int year, const QString &calendarType = "gregorian");
0039     void parseRegionDateRange(const KHolidays::HolidayRegion &region, const QDate &startDate, const QDate &endDate);
0040     void parseRawRegionDateRange(const KHolidays::HolidayRegion &region, const QDate &startDate, const QDate &endDate);
0041     void parseRegionDate(const KHolidays::HolidayRegion &region, const QDate &date);
0042     void parseRegionDateRangeCategory(const KHolidays::HolidayRegion &region, const QDate &startDate, const QDate &endDate, const QString &category);
0043 };
0044 
0045 #endif // TESTHOLIDAYREGION_H