diff --git a/build.gradle b/build.gradle index cc8f8d23..3d549aea 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ compileTestJava { dependencies { testImplementation group: 'junit', name: 'junit', version: '4.13.2' - testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.3.0' + testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.3' testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.10.0' testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3' implementation 'com.google.code.gson:gson:2.13.1' diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java index 169a6c87..ad80c864 100644 --- a/src/test/java/com/siftscience/ContentEventTest.java +++ b/src/test/java/com/siftscience/ContentEventTest.java @@ -163,7 +163,7 @@ public void testCreateListing() throws Exception { " \"$link\": \"https://www.domain.com/file.png\",\n" + " \"$description\": \"Billy's picture\"\n" + " }],\n" + - " \"$expiration_time\": 1549063157000,\n" + + " \"$expiration_time\": 1549063157000\n" + " },\n" + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -271,7 +271,7 @@ public void testCreateMessage() throws Exception { " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + " \"$description\": \"My hike today!\"\n" + - " }],\n" + + " }]\n" + " }," + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -363,7 +363,7 @@ public void testCreateProfile() throws Exception { " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + " \"$description\": \"Alex’s picture\"\n" + - " }],\n" + + " }]\n" + " }," + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -784,7 +784,7 @@ public void testUpdateListing() throws Exception { " \"$link\": \"https://www.domain.com/file.png\",\n" + " \"$description\": \"Billy's picture\"\n" + " }],\n" + - " \"$expiration_time\": 1549063157000,\n" + + " \"$expiration_time\": 1549063157000\n" + " },\n" + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -894,7 +894,7 @@ public void testUpdateMessage() throws Exception { " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + " \"$description\": \"My hike today!\"\n" + - " }],\n" + + " }]\n" + " }," + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -988,7 +988,7 @@ public void testUpdateProfile() throws Exception { " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + " \"$description\": \"Alex’s picture\"\n" + - " }],\n" + + " }]\n" + " }," + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; diff --git a/src/test/java/com/siftscience/CreateOrderEventTest.java b/src/test/java/com/siftscience/CreateOrderEventTest.java index dda13ebe..eaed56a3 100644 --- a/src/test/java/com/siftscience/CreateOrderEventTest.java +++ b/src/test/java/com/siftscience/CreateOrderEventTest.java @@ -978,7 +978,7 @@ public void testCreateOrderEventWithCryptoFields() throws JSONException, IOExcep " \"$payment_methods\": [\n" + " {\n" + " \"$wallet_address\": \"ZplYVmchAoywfMvC8jCiKlBLfKSBiFtHU6\",\n" + - " \"$wallet_type\": \"$crypto\",\n" + + " \"$wallet_type\": \"$crypto\"\n" + " }\n" + " ],\n" + " \"$digital_orders\" : [\n" + @@ -987,9 +987,9 @@ public void testCreateOrderEventWithCryptoFields() throws JSONException, IOExcep " \"$pair\" : \"BTC_USD\",\n" + " \"$asset_type\" : \"$crypto\",\n" + " \"$order_type\" : \"$market\",\n" + - " \"$volume\" : \"6.0\",\n" + + " \"$volume\" : \"6.0\"\n" + " }\n" + - " ],\n" + + " ]\n" + "}\n"; // Start a new mock server and enqueue a mock response. diff --git a/src/test/java/com/siftscience/SiftClientTest.java b/src/test/java/com/siftscience/SiftClientTest.java index d87db9e6..48288b76 100644 --- a/src/test/java/com/siftscience/SiftClientTest.java +++ b/src/test/java/com/siftscience/SiftClientTest.java @@ -310,7 +310,7 @@ public void testNullsAreNotSerialized() throws JSONException { "\"$amount\": 5," + "\"$session_id\": \"foo\"," + "\"custom1\": \"blah\"," + - "\"custom3\": 99," + + "\"custom3\": 99" + "}", fieldSet.toJson(), true); } diff --git a/src/test/java/com/siftscience/TransactionEventTest.java b/src/test/java/com/siftscience/TransactionEventTest.java index bbd52b54..da10ee10 100644 --- a/src/test/java/com/siftscience/TransactionEventTest.java +++ b/src/test/java/com/siftscience/TransactionEventTest.java @@ -383,7 +383,7 @@ public void testTransactionEventWithSentAndReceivedAddresses() throws Exception " \"$region\" : \"New Hampshire\",\n" + " \"$country\" : \"US\",\n" + " \"$zipcode\" : \"03257\"\n" + - " },\n" + + " }\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -469,7 +469,7 @@ public void testTransactionEventWithMerchantAnd3dsFields() throws Exception { " },\n" + " \"$merchant_initiated_transaction\" : true,\n" + " \"$triggered_3ds\" : \"$processor\",\n" + - " \"$status_3ds\" : \"$successful\",\n" + + " \"$status_3ds\" : \"$successful\"\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -539,7 +539,7 @@ public void testTransactionEventWithSepaPaymentMethod() throws Exception { " \"$shortened_iban_first6\" : \"FR7630\",\n" + " \"$shortened_iban_last4\" : \"1234\",\n" + " \"$sepa_direct_debit_mandate\" : true\n" + - " },\n" + + " }\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -602,7 +602,7 @@ public void testTransactionEventWithCryptoFields() throws Exception { "\n" + " \"$payment_method\" : {\n" + " \"$wallet_address\" : \"ZplYVmchAoywfMvC8jCiKlBLfKSBiFtHU6\",\n" + - " \"$wallet_type\" : \"$crypto\",\n" + + " \"$wallet_type\" : \"$crypto\"\n" + " },\n" + " \"$digital_orders\" : [\n" + " {\n" + @@ -610,11 +610,11 @@ public void testTransactionEventWithCryptoFields() throws Exception { " \"$pair\" : \"BTC_USD\",\n" + " \"$asset_type\" : \"$crypto\",\n" + " \"$order_type\" : \"$market\",\n" + - " \"$volume\" : \"6.0\",\n" + + " \"$volume\" : \"6.0\"\n" + " }\n" + " ],\n" + " \"$receiver_wallet_address\" : \"jx17gVqSyo9m4MrhuhuYEUXdCicdof85Bl\",\n" + - " \"$receiver_external_address\" : true,\n" + + " \"$receiver_external_address\" : true\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -683,7 +683,7 @@ public void testTransactionEventWithExtraDepositFields() throws Exception { " \"$minimum_deposit_amount\" : 5000,\n" + " \"$maximum_deposit_amount\" : 100000000,\n" + " \"$current_balance\" : 500000,\n" + - " \"$new_balance\" : 1000000,\n" + + " \"$new_balance\" : 1000000\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -747,7 +747,7 @@ public void testTransactionEventWithExtraWithdrawalFields() throws Exception { " \"$minimum_withdrawal_amount\" : 5000,\n" + " \"$maximum_withdrawal_amount\" : 100000000,\n" + " \"$current_balance\" : 1000000,\n" + - " \"$new_balance\" : 500000,\n" + + " \"$new_balance\" : 500000\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -822,8 +822,8 @@ public void testTransactionEventWithBinMetadata() throws Exception { " \"$type\" : \"CREDIT\",\n" + " \"$brand\" : \"VISA\",\n" + " \"$bank\" : \"Chase\"\n" + - " },\n" + - " },\n" + + " }\n" + + " }\n" + "}"; // Start a new mock server and enqueue a mock response. @@ -889,8 +889,8 @@ public void testTransactionEventWithExchangeRate() throws Exception { " \"$currency_code\" : \"EUR\",\n" + " \"$exchange_rate\" : {\n" + " \"$quote_currency_code\" : \"USD\",\n" + - " \"$rate\" : 1.15,\n" + - " },\n" + + " \"$rate\" : 1.15\n" + + " }\n" + "}"; // Start a new mock server and enqueue a mock response. diff --git a/src/test/java/com/siftscience/UpdateOrderEventTest.java b/src/test/java/com/siftscience/UpdateOrderEventTest.java index d4b65517..61846f72 100644 --- a/src/test/java/com/siftscience/UpdateOrderEventTest.java +++ b/src/test/java/com/siftscience/UpdateOrderEventTest.java @@ -900,7 +900,7 @@ public void testUpdateOrderEventWithMerchantProfileField() " \"$region\" : \"New Hampshire\",\n" + " \"$zipcode\" : \"03257\"\n" + " }\n" + - " },\n" + + " }\n" + "}\n"; // Start a new mock server and enqueue a mock response. @@ -972,7 +972,7 @@ public void testUpdateOrderEventWithCryptoFields() " \"$payment_methods\": [\n" + " {\n" + " \"$wallet_address\": \"ZplYVmchAoywfMvC8jCiKlBLfKSBiFtHU6\",\n" + - " \"$wallet_type\": \"$crypto\",\n" + + " \"$wallet_type\": \"$crypto\"\n" + " }\n" + " ],\n" + " \"$digital_orders\" : [\n" + @@ -981,9 +981,9 @@ public void testUpdateOrderEventWithCryptoFields() " \"$pair\" : \"BTC_USD\",\n" + " \"$asset_type\" : \"$crypto\",\n" + " \"$order_type\" : \"$market\",\n" + - " \"$volume\" : \"6.0\",\n" + + " \"$volume\" : \"6.0\"\n" + " }\n" + - " ],\n" + + " ]\n" + "}\n"; // Start a new mock server and enqueue a mock response. diff --git a/src/test/java/com/siftscience/UpdatePasswordEventTest.java b/src/test/java/com/siftscience/UpdatePasswordEventTest.java index 92609e95..0c6e14ce 100644 --- a/src/test/java/com/siftscience/UpdatePasswordEventTest.java +++ b/src/test/java/com/siftscience/UpdatePasswordEventTest.java @@ -31,7 +31,7 @@ public void testUpdatePassword() throws Exception { " \"$device_manufacturer\" : \"Apple\",\n" + " \"$device_model\" : \"iPhone 4,2\",\n" + " \"$device_unique_id\" : \"A3D261E4-DE0A-470B-9E4A-720F3D3D22E6\",\n" + - " \"$app_version\" : \"3.2.7\",\n" + + " \"$app_version\" : \"3.2.7\"\n" + " },\n" + " \"$reason\" : \"$forced_reset\",\n" + " \"$status\" : \"$success\",\n" + diff --git a/src/test/java/com/siftscience/VerificationEventTest.java b/src/test/java/com/siftscience/VerificationEventTest.java index 5b07b9f1..081fbcbd 100644 --- a/src/test/java/com/siftscience/VerificationEventTest.java +++ b/src/test/java/com/siftscience/VerificationEventTest.java @@ -33,7 +33,7 @@ public void testVerification() throws Exception { " \"$device_manufacturer\" : \"Apple\",\n" + " \"$device_model\" : \"iPhone 4,2\",\n" + " \"$device_unique_id\" : \"A3D261E4-DE0A-470B-9E4A-720F3D3D22E6\",\n" + - " \"$app_version\" : \"3.2.7\",\n" + + " \"$app_version\" : \"3.2.7\"\n" + " },\n" + " \"$status\" : \"$pending\",\n" + " \"$verification_type\" : \"$sms\",\n" + @@ -41,7 +41,7 @@ public void testVerification() throws Exception { " \"$verified_event\" : \"" + verifiedEvent + "\",\n" + " \"$verified_entity_id\" : \"" + verifiedEntityId + "\",\n" + " \"$reason\" : \"" + reason + "\",\n" + - " \"$ip\" : \"128.148.1.135\",\n" + + " \"$ip\" : \"128.148.1.135\"\n" + "}"; // Start a new mock server and enqueue a mock response. diff --git a/src/test/java/com/siftscience/WagerFieldSetTest.java b/src/test/java/com/siftscience/WagerFieldSetTest.java index 0f9edcfd..06777f8e 100644 --- a/src/test/java/com/siftscience/WagerFieldSetTest.java +++ b/src/test/java/com/siftscience/WagerFieldSetTest.java @@ -31,7 +31,7 @@ public void testWagerEvent() throws Exception { " \"$wager_event_type\" : \"sportsbook\",\n" + " \"$wager_event_name\" : \"NFL\",\n" + " \"$wager_event_id\" : \"NFL_2024_N1234\",\n" + - " \"$minimum_wager_amount\" : 1000000,\n" + + " \"$minimum_wager_amount\" : 1000000\n" + "}"; // Start a new mock server and enqueue a mock response.