diff options
| author | Yorke Lee <yorkelee@google.com> | 2013-11-20 15:02:49 -0800 |
|---|---|---|
| committer | Yorke Lee <yorkelee@google.com> | 2013-11-22 10:43:41 -0800 |
| commit | 3671725b58a9768016e141c77424dedb5fd2c55a (patch) | |
| tree | 8e2ba3a38e3cb942a1845e37fbdbbc6d1777387b /tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java | |
| parent | 3ff9c116afdda86f9af4e21a3dcc744a3231e1d0 (diff) | |
| download | packages_apps_Dialer-3671725b58a9768016e141c77424dedb5fd2c55a.tar.gz packages_apps_Dialer-3671725b58a9768016e141c77424dedb5fd2c55a.tar.bz2 packages_apps_Dialer-3671725b58a9768016e141c77424dedb5fd2c55a.zip | |
Fix Dialer tests
* Empty geocode is now " " instead of "-" per UX request
* DialpadFragment now throws IllegalArgumentException instead
of Log.wtf so that it can be tested
* Added contact id column to contactsprovider query
* Modified PhoneNumberDisplayHelper to take an instance of
PhoneNumberUtilsWrapper so that it can be mocked out
Fix label-related tests that were failing due to a change in how we
treat empty labels
Bug: 9111164
Change-Id: If2244586b9d09fa2839fa0ddfc9f369f9dc66e51
Diffstat (limited to 'tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java')
| -rw-r--r-- | tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java b/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java index 6a9817f26..6f5a98658 100644 --- a/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java +++ b/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java @@ -51,6 +51,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { private static final String TEST_COUNTRY_ISO = "US"; /** The geocoded location used in the tests. */ private static final String TEST_GEOCODE = "United States"; + /** Empty geocode label */ + private static final String EMPTY_GEOCODE = ""; /** The object under test. */ private PhoneCallDetailsHelper mHelper; @@ -183,18 +185,18 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { public void testSetPhoneCallDetails_NoGeocode() { setPhoneCallDetailsWithNumberAndGeocode("+14125555555", "1-412-555-5555", null); assertNameEquals("1-412-555-5555"); // The phone number is shown as the name. - assertLabelEquals("-"); // The empty geocode is shown as the label. + assertLabelEquals(EMPTY_GEOCODE); // The empty geocode is shown as the label. } public void testSetPhoneCallDetails_EmptyGeocode() { setPhoneCallDetailsWithNumberAndGeocode("+14125555555", "1-412-555-5555", ""); assertNameEquals("1-412-555-5555"); // The phone number is shown as the name. - assertLabelEquals("-"); // The empty geocode is shown as the label. + assertLabelEquals(EMPTY_GEOCODE); // The empty geocode is shown as the label. } public void testSetPhoneCallDetails_NoGeocodeForVoicemail() { setPhoneCallDetailsWithNumberAndGeocode(TEST_VOICEMAIL_NUMBER, "", "United States"); - assertLabelEquals("-"); // The empty geocode is shown as the label. + assertLabelEquals(EMPTY_GEOCODE); // The empty geocode is shown as the label. } public void testSetPhoneCallDetails_Highlighted() { |
