From dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 4 Jul 2011 22:38:03 +0000 Subject: Added kmymoney git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/mymoney/mymoneyforecasttest.h | 96 +++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 kmymoney2/mymoney/mymoneyforecasttest.h (limited to 'kmymoney2/mymoney/mymoneyforecasttest.h') diff --git a/kmymoney2/mymoney/mymoneyforecasttest.h b/kmymoney2/mymoney/mymoneyforecasttest.h new file mode 100644 index 0000000..9ec2ae9 --- /dev/null +++ b/kmymoney2/mymoney/mymoneyforecasttest.h @@ -0,0 +1,96 @@ +/*************************************************************************** + mymoneyforecasttest.h + ------------------- + copyright : (C) 2007 by Alvaro Soliverez + email : asoliverez@gmail.com + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 __MYMONEYFORECASTTEST_H__ +#define __MYMONEYFORECASTTEST_H__ + +#include + +#include "../mymoney/mymoneyfile.h" +#include "../mymoney/storage/mymoneyseqaccessmgr.h" + +#define private public +#include "mymoneyforecast.h" +#undef private + + +class MyMoneyForecastTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE ( MyMoneyForecastTest ); + CPPUNIT_TEST ( testEmptyConstructor ); + CPPUNIT_TEST ( testDoForecast ); + CPPUNIT_TEST ( testDoForecastInit ); + CPPUNIT_TEST ( testGetForecastAccountList ); + CPPUNIT_TEST ( testCalculateAccountTrend ); + CPPUNIT_TEST ( testGetForecastBalance ); + CPPUNIT_TEST ( testIsForecastAccount ); + CPPUNIT_TEST ( testDoFutureScheduledForecast ); + CPPUNIT_TEST ( testDaysToMinimumBalance ); + CPPUNIT_TEST ( testDaysToZeroBalance ); + CPPUNIT_TEST ( testScheduleForecast ); + CPPUNIT_TEST ( testSkipOpeningDate ); + CPPUNIT_TEST ( testAccountMinimumBalanceDateList ); + CPPUNIT_TEST ( testAccountMaximumBalanceDateList ); + CPPUNIT_TEST ( testAccountAverageBalance ); + CPPUNIT_TEST ( testBeginForecastDate ); + CPPUNIT_TEST ( testHistoryDays ); + CPPUNIT_TEST ( testCreateBudget ); + CPPUNIT_TEST ( testLinearRegression ); + CPPUNIT_TEST_SUITE_END(); + + + + public: + MyMoneyForecastTest(); + void setUp (); + void tearDown (); + void testEmptyConstructor(); + void testDoForecast(); + void testDoForecastInit(); + void testGetForecastAccountList(); + void testCalculateAccountTrend(); + void testGetForecastBalance(); + void testIsForecastAccount(); + void testDoFutureScheduledForecast(); + void testDaysToMinimumBalance(); + void testDaysToZeroBalance(); + void testScheduleForecast(); + void testSkipOpeningDate(); + void testAccountMinimumBalanceDateList(); + void testAccountMaximumBalanceDateList(); + void testAccountAverageBalance(); + void testBeginForecastDate(); + void testHistoryDays(); + void testCreateBudget(); + void testLinearRegression(); + + protected: + MyMoneyForecast *m; + + private: + MyMoneyAccount *account; + + MyMoneySeqAccessMgr* storage; + MyMoneyFile* file; + + MyMoneyMoney moT1; + MyMoneyMoney moT2; + MyMoneyMoney moT3; + MyMoneyMoney moT4; + MyMoneyMoney moT5; +}; + +#endif -- cgit v1.2.1