init_test_fixture.h raw
1 // Copyright (c) 2018-present 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 #include <util/chaintype.h>
13
14
15 namespace wallet {
16 struct InitWalletDirTestingSetup: public BasicTestingSetup {
17 explicit InitWalletDirTestingSetup(ChainType chain_type = ChainType::MAIN);
18 ~InitWalletDirTestingSetup();
19 void SetWalletDir(const fs::path& walletdir_path);
20
21 fs::path m_datadir;
22 fs::path m_cwd;
23 std::map<std::string, fs::path> m_walletdir_path_cases;
24 std::unique_ptr<interfaces::WalletLoader> m_wallet_loader;
25 };
26
27 #endif // BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
28 } // namespace wallet
29