[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/kmymoney/kmymoney2/mymoney/storage
From: Fernando Vilas <fvilas () iname ! com>
Date: 2009-10-16 21:00:58
Message-ID: 1255726858.184980.7237.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1036231 by fvilas:
Add test case for splits to db test
M +11 -0 mymoneydatabasemgrtest.cpp
--- trunk/playground/office/kmymoney/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp \
#1036230:1036231 @@ -668,7 +668,18 @@
it = list.begin();
CPPUNIT_ASSERT((*it).id() == "T000000000000000002");
++it;
+
CPPUNIT_ASSERT((*it).id() == "T000000000000000001");
+ CPPUNIT_ASSERT((*it).postDate() == QDate(2002,5,10));
+ CPPUNIT_ASSERT((*it).splitCount() == 2);
+ QList<MyMoneySplit> splitList = (*it).splits();
+ CPPUNIT_ASSERT(splitList[0].accountId() == "A000006");
+ CPPUNIT_ASSERT(splitList[0].shares() == MyMoneyMoney(100000));
+ CPPUNIT_ASSERT(splitList[0].value() == MyMoneyMoney(100000));
+ CPPUNIT_ASSERT(splitList[1].accountId() == "A000005");
+ CPPUNIT_ASSERT(splitList[1].shares() == MyMoneyMoney(-100000));
+ CPPUNIT_ASSERT(splitList[1].value() == MyMoneyMoney(-100000));
+
++it;
CPPUNIT_ASSERT(it == list.end());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic