Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/com/siftscience/ContentEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
"}";
Expand Down Expand Up @@ -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" +
"}";
Expand Down Expand Up @@ -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" +
"}";
Expand Down Expand Up @@ -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" +
"}";
Expand Down Expand Up @@ -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" +
"}";
Expand Down Expand Up @@ -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" +
"}";
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/siftscience/CreateOrderEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/SiftClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public void testNullsAreNotSerialized() throws JSONException {
"\"$amount\": 5," +
"\"$session_id\": \"foo\"," +
"\"custom1\": \"blah\"," +
"\"custom3\": 99," +
"\"custom3\": 99" +
"}", fieldSet.toJson(), true);
}

Expand Down
24 changes: 12 additions & 12 deletions src/test/java/com/siftscience/TransactionEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -602,19 +602,19 @@ 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" +
" \"$digital_asset\" : \"BTC\",\n" +
" \"$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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/siftscience/UpdateOrderEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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" +
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/UpdatePasswordEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/siftscience/VerificationEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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" +
" \"$verified_value\" : \"" + verifiedValue + "\",\n" +
" \"$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.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/WagerFieldSetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down