32 #ifndef LEDGER_CORE_BASEFIXTURE_H 33 #define LEDGER_CORE_BASEFIXTURE_H 35 #include <gtest/gtest.h> 36 #include <async/QtThreadDispatcher.hpp> 37 #include <src/database/DatabaseSessionPool.hpp> 38 #include <NativePathResolver.hpp> 39 #include <unordered_set> 40 #include <src/wallet/pool/WalletPool.hpp> 41 #include <CoutLogPrinter.hpp> 42 #include <src/api/DynamicObject.hpp> 43 #include <wallet/common/CurrencyBuilder.hpp> 44 #include <wallet/bitcoin/BitcoinLikeWallet.hpp> 45 #include <wallet/bitcoin/database/BitcoinLikeWalletDatabase.h> 46 #include <wallet/bitcoin/database/BitcoinLikeTransactionDatabaseHelper.h> 47 #include <wallet/common/database/AccountDatabaseHelper.h> 48 #include <wallet/pool/database/PoolDatabaseHelper.hpp> 49 #include <utils/JSONUtils.h> 50 #include <wallet/bitcoin/explorers/api/TransactionParser.hpp> 51 #include <async/async_wait.h> 52 #include <wallet/bitcoin/BitcoinLikeAccount.hpp> 53 #include <wallet/ethereum/EthereumLikeAccount.h> 54 #include <wallet/ripple/RippleLikeAccount.h> 55 #include <wallet/tezos/TezosLikeAccount.h> 56 #include <api/BitcoinLikeOperation.hpp> 57 #include <api/BitcoinLikeTransaction.hpp> 58 #include <api/BitcoinLikeInput.hpp> 59 #include <api/BitcoinLikeOutput.hpp> 60 #include <api/BigInt.hpp> 61 #include <net/QtHttpClient.hpp> 62 #include <events/LambdaEventReceiver.hpp> 64 #include <api/Account.hpp> 65 #include <api/BitcoinLikeAccount.hpp> 66 #include <FakeWebSocketClient.h> 67 #include <OpenSSLRandomNumberGenerator.hpp> 87 extern const std::string TX_1;
88 extern const std::string TX_2;
89 extern const std::string TX_3;
90 extern const std::string TX_4;
95 void SetUp()
override;
96 void TearDown()
override;
97 std::shared_ptr<WalletPool> newDefaultPool(
const std::string &poolName =
"my_ppol",
const std::string &password =
"test");
98 void createWallet(
const std::shared_ptr<WalletPool>& pool,
99 const std::string& walletName,
100 const std::string& currencyName,
101 const std::shared_ptr<api::DynamicObject> &configuration);
102 void createAccount(
const std::shared_ptr<WalletPool>& pool,
const std::string &walletName, int32_t index);
104 const std::string& walletName,
105 const std::string& currencyName,
106 const std::shared_ptr<api::DynamicObject> &configuration,
108 const std::string& xpub);
109 std::shared_ptr<BitcoinLikeAccount> createBitcoinLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
112 std::shared_ptr<BitcoinLikeAccount> createBitcoinLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
116 std::shared_ptr<EthereumLikeAccount> createEthereumLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
119 std::shared_ptr<EthereumLikeAccount> createEthereumLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
123 std::shared_ptr<RippleLikeAccount> createRippleLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
126 std::shared_ptr<RippleLikeAccount> createRippleLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
129 std::shared_ptr<TezosLikeAccount> createTezosLikeAccount(
const std::shared_ptr<AbstractWallet>& wallet,
133 std::shared_ptr<QtThreadDispatcher> dispatcher;
134 std::shared_ptr<NativePathResolver> resolver;
135 std::shared_ptr<DatabaseBackend> backend;
136 std::shared_ptr<CoutLogPrinter> printer;
137 std::shared_ptr<QtHttpClient> http;
138 std::shared_ptr<FakeWebSocketClient> ws;
139 std::shared_ptr<OpenSSLRandomNumberGenerator> rng;
142 #endif //LEDGER_CORE_BASEFIXTURE_H Definition: Account.cpp:8
Definition: BitcoinLikeWalletDatabase.h:42
Definition: ExtendedKeyAccountCreationInfo.hpp:16
Definition: BaseFixture.h:76
Definition: AccountCreationInfo.hpp:16