Add second fixture for testing bayesian import matching

This commit is contained in:
Christian Gruber 2020-04-08 23:34:56 +02:00
parent 1858da8ac3
commit c0ee9b7d67

View File

@ -85,6 +85,7 @@ gnc_get_current_book (void)
// Test fixture for tests without bayesian matching
class ImportBackendTest : public testing::Test class ImportBackendTest : public testing::Test
{ {
protected: protected:
@ -159,3 +160,26 @@ TEST_F(ImportBackendTest, CreateTransInfo)
gnc_import_TransInfo_delete(trans_info); gnc_import_TransInfo_delete(trans_info);
}; };
// Test fixture for tests with bayesian matching
class ImportBackendBayesTest : public ImportBackendTest
{
protected:
void SetUp()
{
ImportBackendTest::SetUp();
using namespace testing;
// set bayesian import matching in preferences
ON_CALL(*m_prefs, getBool(StrEq(GNC_PREFS_GROUP_IMPORT), StrEq(GNC_PREF_USE_BAYES)))
.WillByDefault(Return(true));
}
void TearDown()
{
ImportBackendTest::TearDown();
};
};