From 4e9fe0a4d1a611e9e4b3e68de02316e231070d28 Mon Sep 17 00:00:00 2001 From: jean <27791933+jeanlaroche@users.noreply.github.com> Date: Sun, 5 Sep 2021 17:52:34 -0700 Subject: [PATCH] Add missing function to mock account --- libgnucash/engine/mocks/gmock-Account.cpp | 9 +++++++++ libgnucash/engine/mocks/gmock-Account.h | 1 + 2 files changed, 10 insertions(+) diff --git a/libgnucash/engine/mocks/gmock-Account.cpp b/libgnucash/engine/mocks/gmock-Account.cpp index b4dd7d28fc..aea26ed818 100644 --- a/libgnucash/engine/mocks/gmock-Account.cpp +++ b/libgnucash/engine/mocks/gmock-Account.cpp @@ -60,6 +60,15 @@ xaccAccountForEachTransaction(const Account *acc, TransactionCallback proc, return mockaccount ? mockaccount->for_each_transaction(proc, data) : 0; } +SplitList * +xaccAccountGetSplitList (const Account *account) +{ + SCOPED_TRACE(""); + auto mockaccount = gnc_mockaccount(account); + return mockaccount ? mockaccount->xaccAccountGetSplitList() : nullptr; +} + + GncImportMatchMap * gnc_account_imap_create_imap (Account *acc) { diff --git a/libgnucash/engine/mocks/gmock-Account.h b/libgnucash/engine/mocks/gmock-Account.h index 6b7bbaefa3..07a249b1e2 100644 --- a/libgnucash/engine/mocks/gmock-Account.h +++ b/libgnucash/engine/mocks/gmock-Account.h @@ -43,6 +43,7 @@ public: MOCK_METHOD0(commit_edit, void()); MOCK_CONST_METHOD0(get_book, QofBook*()); MOCK_CONST_METHOD2(for_each_transaction, gint(TransactionCallback, void*)); + MOCK_CONST_METHOD0(xaccAccountGetSplitList, SplitList*()); MOCK_METHOD0(create_imap, GncImportMatchMap*()); protected: