diff options
author | Marc Stibane <marc@taler.net> | 2023-01-18 10:12:44 +0100 |
---|---|---|
committer | Marc Stibane <marc@taler.net> | 2023-01-18 10:12:44 +0100 |
commit | a39b676f7bd75898a1ea599c6c0c9e243a416dc9 (patch) | |
tree | 9e4e47163f2ea87707b7bc6d35ba58b94762fac3 /xcode | |
parent | 88bfe66b3faaa39af19ce69e4b4da8f0ea3aaaba (diff) | |
download | quickjs-tart-a39b676f7bd75898a1ea599c6c0c9e243a416dc9.tar.gz quickjs-tart-a39b676f7bd75898a1ea599c6c0c9e243a416dc9.tar.bz2 quickjs-tart-a39b676f7bd75898a1ea599c6c0c9e243a416dc9.zip |
Integration Test and Sample Project calling it
Diffstat (limited to 'xcode')
-rw-r--r-- | xcode/FTalerWalletcore.m | 24 | ||||
-rw-r--r-- | xcode/TalerTest.zip | bin | 0 -> 10026 bytes |
2 files changed, 14 insertions, 10 deletions
diff --git a/xcode/FTalerWalletcore.m b/xcode/FTalerWalletcore.m index 17aade7..462cef8 100644 --- a/xcode/FTalerWalletcore.m +++ b/xcode/FTalerWalletcore.m @@ -17,29 +17,33 @@ static void TALER_WALLET_test_handler(void *cls, const char *message) { - printf("got message: %s\n", message); + printf("%s\n", message); } struct TALER_WALLET_Instance * TALER_WALLET_test(int wait) { - struct TALER_WALLET_Instance *wh = TALER_WALLET_create(); + struct TALER_WALLET_Instance *twi = TALER_WALLET_create(); - TALER_WALLET_set_message_handler(wh, &TALER_WALLET_test_handler, NULL); + TALER_WALLET_set_message_handler(twi, &TALER_WALLET_test_handler, NULL); - TALER_WALLET_run(wh); + TALER_WALLET_run(twi); - TALER_WALLET_send_request(wh, "{\"operation\": \"init\", \"args\": {\"skipDefaults\": true}}"); + TALER_WALLET_send_request(twi, "{\"operation\": \"init\", \"args\": {\"skipDefaults\": true}}"); - TALER_WALLET_send_request(wh, "{\"operation\": \"getVersion\"}"); - - //TALER_WALLET_send_request(wh, "{}"); + TALER_WALLET_send_request(twi, "{\"operation\": \"getVersion\"}"); + TALER_WALLET_send_request(twi, "{\"operation\": \"runIntegrationTest\", \"args\": {" + "\"amountToWithdraw\": \"KUDOS:3\", \"amountToSpend\": \"KUDOS:1\", " + "\"bankBaseUrl\": \"https://bank.demo.taler.net/demobanks/default/access-api/\", " + "\"exchangeBaseUrl\": \"https://exchange.demo.taler.net/\", " + "\"merchantBaseUrl\": \"https://backend.demo.taler.net/\", " + "\"merchantAuthToken\": \"secret-token:sandbox\"}}"); if (wait) { // Wait for wallet thread to finish. // If we don't call this, main() exits // and the wallet thread is killed. - TALER_WALLET_join(wh); + TALER_WALLET_join(twi); } - return wh; + return twi; } diff --git a/xcode/TalerTest.zip b/xcode/TalerTest.zip Binary files differnew file mode 100644 index 0000000..14190e6 --- /dev/null +++ b/xcode/TalerTest.zip |