| Index: chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillPayerInfoTest.java
|
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillPayerInfoTest.java
|
| similarity index 75%
|
| rename from chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.java
|
| rename to chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillPayerInfoTest.java
|
| index 60596a84a83622af4afe8ed5cac52f3da2fcd5b7..b5e53d9421a41a025711c3a8b33cebc102962542 100644
|
| --- a/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.java
|
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillPayerInfoTest.java
|
| @@ -16,10 +16,10 @@ import java.util.Arrays;
|
| import java.util.Collection;
|
|
|
| /**
|
| - * Unit tests for the AutofillContact class.
|
| + * Unit tests for the AutofillPayerInfo class.
|
| */
|
| @RunWith(Parameterized.class)
|
| -public class AutofillContactTest {
|
| +public class AutofillPayerInfoTest {
|
| @Parameters
|
| public static Collection<Object[]> data() {
|
| return Arrays.asList(new Object[][] {
|
| @@ -39,7 +39,7 @@ public class AutofillContactTest {
|
| private final String mExpectedPayerEmail;
|
| private final String mExpectedPayerPhone;
|
|
|
| - public AutofillContactTest(String payerPhone, String payerEmail, boolean isComplete,
|
| + public AutofillPayerInfoTest(String payerPhone, String payerEmail, boolean isComplete,
|
| String expectedLabel, String expectedSublabel, String expectedPayerEmail,
|
| String expectedPayerPhone) {
|
| mPayerPhone = payerPhone;
|
| @@ -54,26 +54,26 @@ public class AutofillContactTest {
|
| @Test
|
| public void test() {
|
| AutofillProfile profile = new AutofillProfile();
|
| - AutofillContact contact =
|
| - new AutofillContact(profile, mPayerPhone, mPayerEmail, mIsComplete);
|
| + AutofillPayerInfo payerInfo =
|
| + new AutofillPayerInfo(profile, mPayerPhone, mPayerEmail, mIsComplete);
|
|
|
| Assert.assertEquals(
|
| - mIsComplete ? "Contact should be complete" : "Contact should be incomplete",
|
| - mIsComplete, contact.isComplete());
|
| - Assert.assertEquals("Contact's profile should be the same as passed into the constructor",
|
| - profile, contact.getProfile());
|
| + mIsComplete ? "Payer info should be complete" : "Payer info should be incomplete",
|
| + mIsComplete, payerInfo.isComplete());
|
| + Assert.assertEquals("PayerInfo's profile should be the same as passed into the constructor",
|
| + profile, payerInfo.getProfile());
|
| assertIdPhoneEmailLabelSublabel(profile.getGUID(), mExpectedPayerPhone, mExpectedPayerEmail,
|
| - mExpectedLabel, mExpectedSublabel, contact);
|
| + mExpectedLabel, mExpectedSublabel, payerInfo);
|
|
|
| - contact.completeContact("some-guid-here", "999-9999", "a@b.com");
|
| - Assert.assertTrue("Contact should be complete", contact.isComplete());
|
| + payerInfo.completePayerInfo("some-guid-here", "999-9999", "a@b.com");
|
| + Assert.assertTrue("Payer info should be complete", payerInfo.isComplete());
|
| assertIdPhoneEmailLabelSublabel("some-guid-here", "999-9999", "a@b.com", "999-9999",
|
| - "a@b.com", contact);
|
| + "a@b.com", payerInfo);
|
| }
|
|
|
| private void assertIdPhoneEmailLabelSublabel(String id, String expectedPhone,
|
| String expectedEmail, String expectedLabel, String expectedSublabel,
|
| - AutofillContact actual) {
|
| + AutofillPayerInfo actual) {
|
| Assert.assertEquals("Identifier should be " + id, id, actual.getIdentifier());
|
| Assert.assertEquals(
|
| "Phone should be " + expectedPhone, expectedPhone, actual.getPayerPhone());
|
|
|