diff options
Diffstat (limited to 'kmymoney2/mymoney/mymoneytransactiontest.cpp')
-rw-r--r-- | kmymoney2/mymoney/mymoneytransactiontest.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kmymoney2/mymoney/mymoneytransactiontest.cpp b/kmymoney2/mymoney/mymoneytransactiontest.cpp index 11af6b3..155dfe0 100644 --- a/kmymoney2/mymoney/mymoneytransactiontest.cpp +++ b/kmymoney2/mymoney/mymoneytransactiontest.cpp @@ -31,16 +31,16 @@ void MyMoneyTransactionTest::tearDown () { void MyMoneyTransactionTest::testEmptyConstructor() { CPPUNIT_ASSERT(m->id().isEmpty()); - CPPUNIT_ASSERT(m->entryDate() == QDate()); + CPPUNIT_ASSERT(m->entryDate() == TQDate()); CPPUNIT_ASSERT(m->memo().isEmpty()); CPPUNIT_ASSERT(m->splits().count() == 0); } void MyMoneyTransactionTest::testSetFunctions() { m->setMemo("Memo"); - m->setPostDate(QDate(1,2,3)); + m->setPostDate(TQDate(1,2,3)); - CPPUNIT_ASSERT(m->postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(m->postDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(m->memo() == "Memo"); } @@ -49,9 +49,9 @@ void MyMoneyTransactionTest::testConstructor() { MyMoneyTransaction a("ID", *m); CPPUNIT_ASSERT(a.id() == "ID"); - CPPUNIT_ASSERT(a.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(a.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.memo() == "Memo"); - CPPUNIT_ASSERT(a.postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(a.postDate() == TQDate(1,2,3)); } void MyMoneyTransactionTest::testCopyConstructor() { @@ -62,9 +62,9 @@ void MyMoneyTransactionTest::testCopyConstructor() { MyMoneyTransaction n(a); CPPUNIT_ASSERT(n.id() == "ID"); - CPPUNIT_ASSERT(n.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(n.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(n.memo() == "Memo"); - CPPUNIT_ASSERT(n.postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(n.postDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(n.value("Key") == "Value"); } @@ -78,9 +78,9 @@ void MyMoneyTransactionTest::testAssignmentConstructor() { n = a; CPPUNIT_ASSERT(n.id() == "ID"); - CPPUNIT_ASSERT(n.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(n.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(n.memo() == "Memo"); - CPPUNIT_ASSERT(n.postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(n.postDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(n.value("Key") == "Value"); } @@ -98,7 +98,7 @@ void MyMoneyTransactionTest::testInequality() { MyMoneyTransaction n(*m); - n.setPostDate(QDate(1,1,1)); + n.setPostDate(TQDate(1,1,1)); CPPUNIT_ASSERT(!(n == *m)); CPPUNIT_ASSERT(n != *m); @@ -259,7 +259,7 @@ void MyMoneyTransactionTest::testExtractSplit() { // this one should fail, as the account is not referenced by // any split in the transaction try { - split = m->splitByAccount(QString("A000003")); + split = m->splitByAccount(TQString("A000003")); CPPUNIT_FAIL("Exception expected"); } catch(MyMoneyException *e) { delete e; @@ -267,7 +267,7 @@ void MyMoneyTransactionTest::testExtractSplit() { // this one should be found try { - split = m->splitByAccount(QString("A000002")); + split = m->splitByAccount(TQString("A000002")); CPPUNIT_ASSERT(split.id() == "S0002"); } catch(MyMoneyException *e) { @@ -277,7 +277,7 @@ void MyMoneyTransactionTest::testExtractSplit() { // this one should be found also try { - split = m->splitByAccount(QString("A000002"), false); + split = m->splitByAccount(TQString("A000002"), false); CPPUNIT_ASSERT(split.id() == "S0001"); } catch(MyMoneyException *e) { CPPUNIT_FAIL("Unexpected exception!"); @@ -373,7 +373,7 @@ void MyMoneyTransactionTest::testModifyDuplicateAccount() { testAddSplits(); MyMoneySplit split; - split = m->splitByAccount(QString("A000002")); + split = m->splitByAccount(TQString("A000002")); split.setAccountId("A000001"); try { m->modifySplit(split); @@ -387,8 +387,8 @@ void MyMoneyTransactionTest::testModifyDuplicateAccount() { } void MyMoneyTransactionTest::testWriteXML() { MyMoneyTransaction t; - t.setPostDate(QDate(2001,12,28)); - t.setEntryDate(QDate(2003,9,29)); + t.setPostDate(TQDate(2001,12,28)); + t.setEntryDate(TQDate(2003,9,29)); t.setId("T000000000000000001"); t.setMemo("Wohnung:Miete"); t.setCommodity("EUR"); @@ -404,12 +404,12 @@ void MyMoneyTransactionTest::testWriteXML() { s.setBankID("SPID"); t.addSplit(s); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("TRANSACTION-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("TRANSACTION-CONTAINER"); doc.appendChild(el); t.writeXML(doc, el); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" " <TRANSACTION postdate=\"2001-12-28\" memo=\"Wohnung:Miete\" id=\"T000000000000000001\" commodity=\"EUR\" entrydate=\"2003-09-29\" >\n" @@ -430,7 +430,7 @@ void MyMoneyTransactionTest::testWriteXML() { void MyMoneyTransactionTest::testReadXML() { MyMoneyTransaction t; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" " <TRANSACTION postdate=\"2001-12-28\" memo=\"Wohnung:Miete\" id=\"T000000000000000001\" commodity=\"EUR\" entrydate=\"2003-09-29\" >\n" @@ -444,7 +444,7 @@ void MyMoneyTransactionTest::testReadXML() { "</TRANSACTION-CONTAINER>\n" ); - QString ref_false = QString( + TQString ref_false = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" " <TRANS-ACTION postdate=\"2001-12-28\" memo=\"Wohnung:Miete\" id=\"T000000000000000001\" commodity=\"EUR\" entrydate=\"2003-09-29\" >\n" @@ -458,8 +458,8 @@ void MyMoneyTransactionTest::testReadXML() { "</TRANSACTION-CONTAINER>\n" ); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); @@ -476,8 +476,8 @@ void MyMoneyTransactionTest::testReadXML() { t.setValue("key", "VALUE"); try { t = MyMoneyTransaction(node); - CPPUNIT_ASSERT(t.m_postDate == QDate(2001,12,28)); - CPPUNIT_ASSERT(t.m_entryDate == QDate(2003,9,29)); + CPPUNIT_ASSERT(t.m_postDate == TQDate(2001,12,28)); + CPPUNIT_ASSERT(t.m_entryDate == TQDate(2003,9,29)); CPPUNIT_ASSERT(t.id() == "T000000000000000001"); CPPUNIT_ASSERT(t.m_memo == "Wohnung:Miete"); CPPUNIT_ASSERT(t.m_commodity == "EUR"); @@ -494,7 +494,7 @@ void MyMoneyTransactionTest::testReadXMLEx() { MyMoneyTransaction t; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" "<TRANSACTION postdate=\"2010-03-05\" memo=\"\" id=\"T000000000000004189\" commodity=\"EUR\" entrydate=\"2010-03-08\" >\n" @@ -523,8 +523,8 @@ void MyMoneyTransactionTest::testReadXMLEx() "</TRANSACTION>\n" "</TRANSACTION-CONTAINER>\n" ); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_ok); node = doc.documentElement().firstChild().toElement(); @@ -550,8 +550,8 @@ void MyMoneyTransactionTest::testReadXMLEx() void MyMoneyTransactionTest::testHasReferenceTo() { MyMoneyTransaction t; - t.setPostDate(QDate(2001,12,28)); - t.setEntryDate(QDate(2003,9,29)); + t.setPostDate(TQDate(2001,12,28)); + t.setEntryDate(TQDate(2003,9,29)); t.setId("T000000000000000001"); t.setMemo("Wohnung:Miete"); t.setCommodity("EUR"); @@ -616,7 +616,7 @@ void MyMoneyTransactionTest::testModifyMissingAccountId() { testAddSplits(); MyMoneySplit s = m->splits()[0]; - s.setAccountId(QString()); + s.setAccountId(TQString()); try { m->modifySplit(s); |