Bitcoin ABC  0.24.11
P2P Digital Currency
init_test_fixture.h
Go to the documentation of this file.
1 // Copyright (c) 2018 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
6 #define BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
7 
8 #include <interfaces/chain.h>
9 #include <interfaces/wallet.h>
10 #include <node/context.h>
11 #include <test/util/setup_common.h>
12 
13 struct InitWalletDirTestingSetup : public BasicTestingSetup {
15  const std::string &chainName = CBaseChainParams::MAIN);
17  void SetWalletDir(const fs::path &walletdir_path);
18 
21  std::map<std::string, fs::path> m_walletdir_path_cases;
22  std::unique_ptr<interfaces::Chain> m_chain;
23  std::unique_ptr<interfaces::WalletClient> m_wallet_client;
24 };
25 
26 #endif // BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
InitWalletDirTestingSetup::m_cwd
fs::path m_cwd
Definition: init_test_fixture.h:20
InitWalletDirTestingSetup::~InitWalletDirTestingSetup
~InitWalletDirTestingSetup()
Definition: init_test_fixture.cpp:41
chain.h
context.h
InitWalletDirTestingSetup
Definition: init_test_fixture.h:13
InitWalletDirTestingSetup::m_chain
std::unique_ptr< interfaces::Chain > m_chain
Definition: init_test_fixture.h:22
fs::path
Path class wrapper to prepare application code for transition from boost::filesystem library to std::...
Definition: fs.h:33
InitWalletDirTestingSetup::m_wallet_client
std::unique_ptr< interfaces::WalletClient > m_wallet_client
Definition: init_test_fixture.h:23
InitWalletDirTestingSetup::m_walletdir_path_cases
std::map< std::string, fs::path > m_walletdir_path_cases
Definition: init_test_fixture.h:21
InitWalletDirTestingSetup::InitWalletDirTestingSetup
InitWalletDirTestingSetup(const std::string &chainName=CBaseChainParams::MAIN)
Definition: init_test_fixture.cpp:12
CBaseChainParams::MAIN
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
Definition: chainparamsbase.h:21
InitWalletDirTestingSetup::m_datadir
fs::path m_datadir
Definition: init_test_fixture.h:19
wallet.h
InitWalletDirTestingSetup::SetWalletDir
void SetWalletDir(const fs::path &walletdir_path)
Definition: init_test_fixture.cpp:45