Merge "Fix failing tests."

This commit is contained in:
Makoto Onuki 2010-07-30 16:06:36 -07:00 committed by Android (Google) Code Review
commit 20bf78222b
2 changed files with 8 additions and 2 deletions

View File

@ -194,9 +194,9 @@ public class UtilityUnitTests extends AndroidTestCase {
Log.w(Email.LOG_TAG, "TelephonyManager not supported. Skipping."); Log.w(Email.LOG_TAG, "TelephonyManager not supported. Skipping.");
return; return;
} }
final String deviceId = Utility.getConsistentDeviceId(getContext());
assertNotNull(deviceId);
// Note null is a valid return value. But still it should be consistent.
final String deviceId = Utility.getConsistentDeviceId(getContext());
final String deviceId2 = Utility.getConsistentDeviceId(getContext()); final String deviceId2 = Utility.getConsistentDeviceId(getContext());
// Should be consistent. // Should be consistent.
assertEquals(deviceId, deviceId2); assertEquals(deviceId, deviceId2);

View File

@ -41,6 +41,12 @@ public class SyncManagerAccountTests extends AccountTestCase {
super(); super();
} }
@Override
protected void setUp() throws Exception {
super.setUp();
mMockContext = getMockContext();
}
public void testReleaseSyncHolds() { public void testReleaseSyncHolds() {
Context context = mMockContext; Context context = mMockContext;
SyncManager syncManager = new SyncManager(); SyncManager syncManager = new SyncManager();