1 #ifndef GMOCK_ACCOUNT_H 2 #define GMOCK_ACCOUNT_H 4 #include <gmock/gmock.h> 11 #include "gmock-gobject.h" 14 GType gnc_mockaccount_get_type(
void);
16 #define GNC_TYPE_MOCKACCOUNT (gnc_mockaccount_get_type ()) 17 #define GNC_IS_MOCKACCOUNT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_MOCKACCOUNT)) 28 void*
operator new(
size_t size)
30 return mock_g_object_new (GNC_TYPE_MOCKACCOUNT, NULL, size);
38 void operator delete(
void* acc,
size_t size)
40 mock_g_object_unref(acc, size);
43 MOCK_METHOD0(begin_edit,
void());
44 MOCK_METHOD0(commit_edit,
void());
45 MOCK_CONST_METHOD0(get_book, QofBook*());
46 MOCK_CONST_METHOD0(get_commodity, gnc_commodity*());
47 MOCK_CONST_METHOD2(for_each_transaction, gint(TransactionCallback,
void*));
49 MOCK_CONST_METHOD0(xaccAccountGetSplits, std::vector<Split*>&());
50 MOCK_METHOD2(find_account,
Account *(
const char*,
const char*));
51 MOCK_METHOD3(add_account,
void(
const char*,
const char*,
Account*));
52 MOCK_METHOD1(find_account_bayes,
Account *(std::vector<const char*>&));
53 MOCK_METHOD2(add_account_bayes,
void(std::vector<const char*>&,
Account*));
64 gnc_mockaccount (
Account *account)
66 if (GNC_IS_MOCKACCOUNT(account))
68 ADD_FAILURE() <<
"Expected 'account' to be of type 'MockAccount'";
73 gnc_mockaccount (
const Account *account)
75 if (GNC_IS_MOCKACCOUNT(account))
77 ADD_FAILURE() <<
"Expected 'account' to be of type 'MockAccount'";
This is the private header for the account structure.
SplitList * xaccAccountGetSplitList(const Account *acc)
The xaccAccountGetSplitList() routine returns a pointer to a GList of the splits in the account...
GList SplitList
GList of Split.
Account handling public routines.
Account public routines (C++ api)
Encapsulate all the information about a dataset.