test(ethereum): Add 007Transfer_0002TransferFailureNullParam
@@ -45,6 +45,28 @@ START_TEST(test_007Transfer_0001TransferSuccess)
BoatIotSdkDeInit();
}
+START_TEST(test_007Transfer_0002TransferFailureNullParam)
+{
+ BOAT_RESULT result;
+ BoatEthTx tx_ctx;
+
+ BoatIotSdkInit();
+
+ ethereumWalletPrepare();
+
+ result = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ctx, BOAT_TRUE, NULL,
+ "0x333333",
+ (BCHAR *)TEST_RECIPIENT_ADDRESS);
+ ck_assert_int_eq(result, BOAT_SUCCESS);
+
+ result = BoatEthTransfer(&tx_ctx, NULL);
+ ck_assert_int_eq(result, BOAT_ERROR_COMMON_INVALID_ARGUMENT);
+
+ BoatIotSdkDeInit();
+}
+
+
+
Suite *make_transactions_suite(void)
{
/* Create Suite */
@@ -60,6 +82,7 @@ Suite *make_transactions_suite(void)
/* Test cases are added to the test set */
tcase_add_test(tc_transaction_api, test_007Transfer_0001TransferSuccess);
+ tcase_add_test(tc_transaction_api, test_007Transfer_0002TransferFailureNullParam);
return s_transaction;
}
