1 // Copyright (c) 2016-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_WALLET_TEST_FIXTURE_H 6 #define BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H 7 8 #include <test/test_bitcoin.h> 9 10 #include <interfaces/chain.h> 11 #include <interfaces/wallet.h> 12 #include <wallet/wallet.h> 13 14 #include <memory> 15 16 /** Testing setup and teardown for wallet. 17 */ 18 struct WalletTestingSetup: public TestingSetup { 19 explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN); 20 ~WalletTestingSetup(); 21 22 std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(); 23 CWallet m_wallet; 24 }; 25 26 #endif // BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H 27