/***************************************************************************
                          mymoneymoneytest.h
                          -------------------
    copyright            : (C) 2002 by Thomas Baumgart
    email                : ipwizard@users.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 __MYMONEYMONEYTEST_H__
#define __MYMONEYMONEYTEST_H__

#include <cppunit/extensions/HelperMacros.h>

#define private public
#include "mymoneymoney.h"
#undef private

class MyMoneyMoneyTest : public CppUnit::TestFixture  {
	CPPUNIT_TEST_SUITE(MyMoneyMoneyTest);
	CPPUNIT_TEST(testEmptyConstructor);
	CPPUNIT_TEST(testAssignment);
	CPPUNIT_TEST(testStringConstructor);
	CPPUNIT_TEST(testEquality);
	CPPUNIT_TEST(testInequality);
	CPPUNIT_TEST(testAddition);
	CPPUNIT_TEST(testSubtraction);
	CPPUNIT_TEST(testMultiplication);
	CPPUNIT_TEST(testFormatMoney);
	CPPUNIT_TEST(testSetDecimalSeparator);
	CPPUNIT_TEST(testSetThousandSeparator);
	CPPUNIT_TEST(testRelation);
	CPPUNIT_TEST(testUnaryMinus);
	CPPUNIT_TEST(testDoubleConstructor);
	CPPUNIT_TEST(testAbsoluteFunction);
	CPPUNIT_TEST(testToString);
	CPPUNIT_TEST(testFromString);
	CPPUNIT_TEST_SUITE_END();

protected:
	MyMoneyMoney *m_0, *m_1, *m_2, *m_3;
public:
	MyMoneyMoneyTest();

	void setUp();
	void tearDown();
	void testEmptyConstructor();
	void testAssignment();
	void testStringConstructor();
	void testEquality();
	void testInequality();
	void testAddition();
	void testSubtraction();
	void testMultiplication();
	void testFormatMoney();
	void testSetDecimalSeparator();
	void testSetThousandSeparator();
	void testRelation();
	void testUnaryMinus();
	void testDoubleConstructor();
	void testAbsoluteFunction();
	void testToString();
	void testFromString();
};

#endif
