summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneyscheduletest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/mymoney/mymoneyscheduletest.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneyscheduletest.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp
index 07b3cc6..d3c20d2 100644
--- a/kmymoney2/mymoney/mymoneyscheduletest.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduletest.cpp
@@ -55,7 +55,7 @@ void MyMoneyScheduleTest::testConstructor() {
MyMoneySchedule::TYPE_BILL,
MyMoneySchedule::OCCUR_WEEKLY, 1,
MyMoneySchedule::STYPE_DIRECTDEBIT,
- TQDate::tqcurrentDate(),
+ TQDate::currentDate(),
TQDate(),
true,
true);
@@ -82,8 +82,8 @@ void MyMoneyScheduleTest::testSetFunctions() {
s.setType(MyMoneySchedule::TYPE_BILL);
CPPUNIT_ASSERT(s.type() == MyMoneySchedule::TYPE_BILL);
- s.setEndDate(TQDate::tqcurrentDate());
- CPPUNIT_ASSERT(s.endDate() == TQDate::tqcurrentDate());
+ s.setEndDate(TQDate::currentDate());
+ CPPUNIT_ASSERT(s.endDate() == TQDate::currentDate());
CPPUNIT_ASSERT(s.willEnd() == true);
}
@@ -229,16 +229,16 @@ void MyMoneyScheduleTest::testOverdue()
MyMoneySchedule sch_overdue;
MyMoneySchedule sch_intime;
- // the following checks only work correctly, if tqcurrentDate() is
+ // the following checks only work correctly, if currentDate() is
// between the 1st and 27th. If it is between 28th and 31st
// we don't perform them. Note: this should be fixed.
- if(TQDate::tqcurrentDate().day() > 27 || TQDate::tqcurrentDate().day() == 1) {
+ if(TQDate::currentDate().day() > 27 || TQDate::currentDate().day() == 1) {
std::cout << std::endl << "testOverdue() skipped because current day is between 28th and 2nd" << std::endl;
return;
}
- TQDate startDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-23);
- TQDate lastPaymentDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-1);
+ TQDate startDate = TQDate::currentDate().addDays(-1).addMonths(-23);
+ TQDate lastPaymentDate = TQDate::currentDate().addDays(-1).addMonths(-1);
TQString ref = TQString(
"<!DOCTYPE TEST>\n"
@@ -1010,13 +1010,13 @@ void MyMoneyScheduleTest::testWriteXML() {
MyMoneySchedule::TYPE_BILL,
MyMoneySchedule::OCCUR_WEEKLY, 123,
MyMoneySchedule::STYPE_DIRECTDEBIT,
- TQDate::tqcurrentDate(),
+ TQDate::currentDate(),
TQDate(),
true,
true);
- sch.setLastPayment(TQDate::tqcurrentDate());
- sch.recordPayment(TQDate::tqcurrentDate());
+ sch.setLastPayment(TQDate::currentDate());
+ sch.recordPayment(TQDate::currentDate());
sch.setId("SCH0001");
MyMoneyTransaction t;
@@ -1070,9 +1070,9 @@ void MyMoneyScheduleTest::testWriteXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref);
}
@@ -1098,9 +1098,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate));
// diff to ref_ok1 is that we now have an empty entrydate
// in the transaction parameters
@@ -1122,9 +1122,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate));
TQString ref_false = TQString(
"<!DOCTYPE TEST>\n"
@@ -1144,9 +1144,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1167,13 +1167,13 @@ void MyMoneyScheduleTest::testReadXML() {
try {
sch = MyMoneySchedule(node);
CPPUNIT_ASSERT(sch.id() == "SCH0002");
- CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7));
- CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::currentDate().addDays(7));
+ CPPUNIT_ASSERT(sch.startDate() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.endDate() == TQDate());
CPPUNIT_ASSERT(sch.autoEnter() == true);
CPPUNIT_ASSERT(sch.isFixed() == true);
CPPUNIT_ASSERT(sch.weekendOption() == MyMoneySchedule::MoveNothing);
- CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.lastPayment() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT);
CPPUNIT_ASSERT(sch.type() == MyMoneySchedule::TYPE_BILL);
CPPUNIT_ASSERT(sch.name() == "A Name");
@@ -1181,7 +1181,7 @@ void MyMoneyScheduleTest::testReadXML() {
CPPUNIT_ASSERT(sch.occurenceMultiplier() == 1);
CPPUNIT_ASSERT(sch.nextDueDate() == sch.lastPayment().addDays(7));
CPPUNIT_ASSERT(sch.recordedPayments().count() == 1);
- CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::currentDate());
} catch(MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");
@@ -1194,13 +1194,13 @@ void MyMoneyScheduleTest::testReadXML() {
try {
sch = MyMoneySchedule(node);
CPPUNIT_ASSERT(sch.id() == "SCH0002");
- CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7));
- CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::currentDate().addDays(7));
+ CPPUNIT_ASSERT(sch.startDate() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.endDate() == TQDate());
CPPUNIT_ASSERT(sch.autoEnter() == true);
CPPUNIT_ASSERT(sch.isFixed() == true);
CPPUNIT_ASSERT(sch.weekendOption() == MyMoneySchedule::MoveNothing);
- CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.lastPayment() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT);
CPPUNIT_ASSERT(sch.type() == MyMoneySchedule::TYPE_BILL);
CPPUNIT_ASSERT(sch.name() == "A Name");
@@ -1208,7 +1208,7 @@ void MyMoneyScheduleTest::testReadXML() {
CPPUNIT_ASSERT(sch.occurenceMultiplier() == 1);
CPPUNIT_ASSERT(sch.nextDueDate() == sch.lastPayment().addDays(7));
CPPUNIT_ASSERT(sch.recordedPayments().count() == 1);
- CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::currentDate());
} catch(MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");
@@ -1236,9 +1236,9 @@ void MyMoneyScheduleTest::testHasReferenceTo()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate))
+ .tqarg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1872,7 +1872,7 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
// https://bugs.kde.org/show_bug.cgi?id=231029
MyMoneySchedule sch;
- TQDate paymentInFuture = TQDate::tqcurrentDate().addDays(7);
+ TQDate paymentInFuture = TQDate::currentDate().addDays(7);
TQString ref_ok = TQString(
"<!DOCTYPE TEST>\n"
@@ -1900,7 +1900,7 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
sch = MyMoneySchedule(node);
CPPUNIT_ASSERT(sch.isFinished() == true);
CPPUNIT_ASSERT(sch.occurencePeriod() == MyMoneySchedule::OCCUR_MONTHLY);
- CPPUNIT_ASSERT(sch.paymentDates(TQDate::tqcurrentDate(), TQDate::tqcurrentDate().addDays(21)).count() == 0);
+ CPPUNIT_ASSERT(sch.paymentDates(TQDate::currentDate(), TQDate::currentDate().addDays(21)).count() == 0);
} catch (MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");