Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.java

Issue 2163693002: [Merge M-53] Credit card editor for PaymentRequest UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.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/AutofillContactTest.java
index f4daa6066f29a244c6a5de32ae30031258d6bd8f..60596a84a83622af4afe8ed5cac52f3da2fcd5b7 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillContactTest.java
@@ -57,19 +57,24 @@ public class AutofillContactTest {
AutofillContact contact =
new AutofillContact(profile, mPayerPhone, mPayerEmail, mIsComplete);
- Assert.assertEquals(mIsComplete, contact.isComplete());
- Assert.assertEquals(profile, contact.getProfile());
- Assert.assertEquals(profile.getGUID(), contact.getIdentifier());
- assertPhoneEmailLabelSublabel(mExpectedPayerPhone, mExpectedPayerEmail, mExpectedLabel,
- mExpectedSublabel, contact);
+ 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());
+ assertIdPhoneEmailLabelSublabel(profile.getGUID(), mExpectedPayerPhone, mExpectedPayerEmail,
+ mExpectedLabel, mExpectedSublabel, contact);
- contact.completeContact("999-9999", "a@b.com");
- Assert.assertTrue(contact.isComplete());
- assertPhoneEmailLabelSublabel("999-9999", "a@b.com", "999-9999", "a@b.com", contact);
+ contact.completeContact("some-guid-here", "999-9999", "a@b.com");
+ Assert.assertTrue("Contact should be complete", contact.isComplete());
+ assertIdPhoneEmailLabelSublabel("some-guid-here", "999-9999", "a@b.com", "999-9999",
+ "a@b.com", contact);
}
- private void assertPhoneEmailLabelSublabel(String expectedPhone, String expectedEmail,
- String expectedLabel, String expectedSublabel, AutofillContact actual) {
+ private void assertIdPhoneEmailLabelSublabel(String id, String expectedPhone,
+ String expectedEmail, String expectedLabel, String expectedSublabel,
+ AutofillContact actual) {
+ Assert.assertEquals("Identifier should be " + id, id, actual.getIdentifier());
Assert.assertEquals(
"Phone should be " + expectedPhone, expectedPhone, actual.getPayerPhone());
Assert.assertEquals(

Powered by Google App Engine
This is Rietveld 408576698