summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneyfiletest.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
commitdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch)
tree99e72842fe687baea16376a147619b6048d7e441 /kmymoney2/mymoney/mymoneyfiletest.h
downloadkmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz
kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/mymoney/mymoneyfiletest.h')
-rw-r--r--kmymoney2/mymoney/mymoneyfiletest.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/kmymoney2/mymoney/mymoneyfiletest.h b/kmymoney2/mymoney/mymoneyfiletest.h
new file mode 100644
index 0000000..b54af25
--- /dev/null
+++ b/kmymoney2/mymoney/mymoneyfiletest.h
@@ -0,0 +1,128 @@
+/***************************************************************************
+ mymoneyfiletest.h
+ -------------------
+ copyright : (C) 2002 by Thomas Baumgart
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef __MYMONEYFILETEST_H__
+#define __MYMONEYFILETEST_H__
+
+#include <cppunit/extensions/HelperMacros.h>
+#include "autotest.h"
+
+#define private public
+#define protected public
+#include "mymoneyfile.h"
+#include "storage/mymoneyseqaccessmgr.h"
+#undef private
+#undef protected
+
+class MyMoneyFileTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(MyMoneyFileTest);
+ CPPUNIT_TEST(testEmptyConstructor);
+ CPPUNIT_TEST(testAddOneInstitution);
+ CPPUNIT_TEST(testAddTwoInstitutions);
+ CPPUNIT_TEST(testInstitutionRetrieval);
+ CPPUNIT_TEST(testRemoveInstitution);
+ CPPUNIT_TEST(testInstitutionListRetrieval);
+ CPPUNIT_TEST(testInstitutionModify);
+ CPPUNIT_TEST(testSetFunctions);
+ CPPUNIT_TEST(testAddAccounts);
+ CPPUNIT_TEST(testModifyAccount);
+ CPPUNIT_TEST(testModifyStdAccount);
+ CPPUNIT_TEST(testReparentAccount);
+ CPPUNIT_TEST(testRemoveAccount);
+ CPPUNIT_TEST(testRemoveAccountTree);
+ CPPUNIT_TEST(testAccountListRetrieval);
+ CPPUNIT_TEST(testAddTransaction);
+ CPPUNIT_TEST(testHasActiveSplits);
+ CPPUNIT_TEST(testIsStandardAccount);
+ CPPUNIT_TEST(testModifyTransactionSimple);
+ CPPUNIT_TEST(testModifyTransactionNewPostDate);
+ CPPUNIT_TEST(testModifyTransactionNewAccount);
+ CPPUNIT_TEST(testRemoveTransaction);
+ CPPUNIT_TEST(testBalanceTotal);
+ CPPUNIT_TEST(testSetAccountName);
+ CPPUNIT_TEST(testAddPayee);
+ CPPUNIT_TEST(testModifyPayee);
+ CPPUNIT_TEST(testRemovePayee);
+ CPPUNIT_TEST(testAddTransactionStd);
+ CPPUNIT_TEST(testAttachStorage);
+ CPPUNIT_TEST(testAccount2Category);
+ CPPUNIT_TEST(testCategory2Account);
+ CPPUNIT_TEST(testAttachedStorage);
+ CPPUNIT_TEST(testHasAccount);
+ CPPUNIT_TEST(testAddEquityAccount);
+ CPPUNIT_TEST(testReparentEquity);
+ CPPUNIT_TEST(testBaseCurrency);
+ CPPUNIT_TEST(testOpeningBalanceNoBase);
+ CPPUNIT_TEST(testOpeningBalance);
+#if 0
+ CPPUNIT_TEST(testMoveSplits);
+#endif
+ CPPUNIT_TEST_SUITE_END();
+protected:
+ MyMoneyFile *m;
+ MyMoneySeqAccessMgr* storage;
+ MyMoneyAccount m_inv;
+
+public:
+ MyMoneyFileTest ();
+
+ void setUp ();
+ void tearDown ();
+ void testEmptyConstructor();
+ void testAddOneInstitution();
+ void testAddTwoInstitutions();
+ void testRemoveInstitution();
+ void testInstitutionRetrieval ();
+ void testInstitutionListRetrieval ();
+ void testInstitutionModify();
+ void testSetFunctions();
+ void testAddAccounts();
+ void testModifyAccount();
+ void testModifyStdAccount();
+ void testReparentAccount();
+ void testRemoveAccount();
+ void testRemoveAccountTree();
+ void testAccountListRetrieval ();
+ void testAddTransaction ();
+ void testIsStandardAccount();
+ void testHasActiveSplits();
+ void testModifyTransactionSimple();
+ void testModifyTransactionNewPostDate();
+ void testModifyTransactionNewAccount();
+ void testRemoveTransaction ();
+ void testBalanceTotal();
+ void testSetAccountName();
+ void testAddPayee();
+ void testModifyPayee();
+ void testRemovePayee();
+ void testAddTransactionStd();
+ void testAttachStorage();
+ void testAccount2Category();
+ void testCategory2Account();
+ void testAttachedStorage();
+ void testHasAccount();
+ void testAddEquityAccount();
+ void testReparentEquity();
+ void testReparentEquity(QValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& parent);
+ void testBaseCurrency();
+ void testOpeningBalanceNoBase();
+ void testOpeningBalance();
+
+private:
+ void testRemoveStdAccount(const MyMoneyAccount& acc);
+};
+
+#endif