Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
warmkesselj committed Dec 6, 2024
1 parent 073938b commit fe9def0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.braintreepayments.api.testutils.Fixtures;

import org.json.JSONException;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
Expand All @@ -32,6 +33,7 @@ public class PayPalVaultRequestUnitTest {
public void newPayPalVaultRequest_setsDefaultValues() {
PayPalVaultRequest request = new PayPalVaultRequest(false);

assertNull(request.getShopperSessionId());
assertNull(request.getLocaleCode());
assertFalse(request.isShippingAddressRequired());
assertNull(request.getShippingAddressOverride());
Expand All @@ -46,6 +48,7 @@ public void newPayPalVaultRequest_setsDefaultValues() {
public void setsValuesCorrectly() {
PostalAddress postalAddress = new PostalAddress();
PayPalVaultRequest request = new PayPalVaultRequest(true);
request.setShopperSessionId("shopper-insights-id");
request.setLocaleCode("US");
request.setBillingAgreementDescription("Billing Agreement Description");
request.setShippingAddressRequired(true);
Expand Down Expand Up @@ -75,6 +78,7 @@ public void setsValuesCorrectly() {
request.setRecurringBillingDetails(billingDetails);
request.setRecurringBillingPlanType(PayPalRecurringBillingPlanType.RECURRING);

assertEquals("shopper-insights-id", request.getShopperSessionId());
assertEquals("US", request.getLocaleCode());
assertEquals("Billing Agreement Description", request.getBillingAgreementDescription());
assertTrue(request.isShippingAddressRequired());
Expand Down

0 comments on commit fe9def0

Please sign in to comment.