diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-04-04 14:56:17 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-04-04 14:56:17 +0300 |
commit | ee5bb17f26390ceb55dd277932585b0020077e9e (patch) | |
tree | 1d30a5bcdf19f9d2b60e43274a13d918fe1a8f42 /tests | |
parent | Wallet::transfer in progress (diff) | |
download | monero-ee5bb17f26390ceb55dd277932585b0020077e9e.tar.xz |
Wallet::transfer() continued
Diffstat (limited to '')
-rw-r--r-- | tests/libwallet_api_tests/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp index d935a38b7..970d9a74e 100644 --- a/tests/libwallet_api_tests/main.cpp +++ b/tests/libwallet_api_tests/main.cpp @@ -77,6 +77,9 @@ struct WalletManagerTest : public testing::Test const char * TESTNET_WALLET_PASS = ""; const char * TESTNET_DAEMON_ADDRESS = "localhost:38081"; + const uint64_t AMOUNT_10XMR = 10000000000000L; + const uint64_t AMOUNT_5XMR = 50000000000000L; + const char * RECIPIENT_WALLET_ADDRESS = "9uekQVGj7NjSAREnZ8cUsRagWDdjvdhpwUKhsL95oXngBnZXZ1RzH8R6UJbU1R7wim9yKbSjxuoQ22ERRkEochGECj66oP3"; WalletManagerTest() { @@ -261,6 +264,19 @@ TEST_F(WalletManagerTest, WalletRefresh) ASSERT_TRUE(wmgr->closeWallet(wallet1)); } +TEST_F(WalletManagerTest, WalletTransfer) +{ + Bitmonero::Wallet * wallet1 = wmgr->openWallet(TESTNET_WALLET_NAME, TESTNET_WALLET_PASS, true); + // make sure testnet daemon is running + ASSERT_TRUE(wallet1->init(TESTNET_DAEMON_ADDRESS, 0)); + ASSERT_TRUE(wallet1->refresh()); + uint64_t balance = wallet1->balance(); + ASSERT_TRUE(wallet1->transfer(RECIPIENT_WALLET_ADDRESS, AMOUNT_10XMR)); + ASSERT_FALSE(wallet1->balance() == balance); + ASSERT_TRUE(wmgr->closeWallet(wallet1)); +} + + int main(int argc, char** argv) { |