From fe5ed7b4b5a8398a3b826481275f4f478f43a506 Mon Sep 17 00:00:00 2001 From: Andrew Stadler Date: Tue, 1 Sep 2009 14:46:27 -0700 Subject: [PATCH] DO NOT MERGE Remove test code Bug # 2092944 --- res/xml/senders.xml | 2 +- res/xml/stores.xml | 4 ++-- .../AccountSetupAccountTypeUnitTests.java | 18 ++++++++++++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/res/xml/senders.xml b/res/xml/senders.xml index 51d540197..5ae1707dc 100644 --- a/res/xml/senders.xml +++ b/res/xml/senders.xml @@ -33,5 +33,5 @@ - + diff --git a/res/xml/stores.xml b/res/xml/stores.xml index d362a8e4c..e2f0f29be 100644 --- a/res/xml/stores.xml +++ b/res/xml/stores.xml @@ -35,6 +35,6 @@ - + diff --git a/tests/src/com/android/email/activity/setup/AccountSetupAccountTypeUnitTests.java b/tests/src/com/android/email/activity/setup/AccountSetupAccountTypeUnitTests.java index 9ad9a7734..f2a56815f 100644 --- a/tests/src/com/android/email/activity/setup/AccountSetupAccountTypeUnitTests.java +++ b/tests/src/com/android/email/activity/setup/AccountSetupAccountTypeUnitTests.java @@ -18,19 +18,19 @@ package com.android.email.activity.setup; import com.android.email.Account; import com.android.email.Preferences; +import com.android.email.R; import com.android.email.mail.Store; import android.content.Context; import android.content.Intent; import android.test.ActivityUnitTestCase; import android.test.suitebuilder.annotation.SmallTest; +import android.view.View; import java.util.HashSet; /** * This is a series of unit tests for the AccountSetupAccountType class. - * - * This is just unit tests of simple calls - the activity is not instantiated */ @SmallTest public class AccountSetupAccountTypeUnitTests @@ -91,13 +91,23 @@ public class AccountSetupAccountTypeUnitTests info.mAccountInstanceLimit = 2; assertFalse("limit, reached", activity.checkAccountInstanceLimit(info)); } - + + /** + * Confirm that EAS is not presented (not supported in this release) + */ + public void testEasOffered() { + Account acct1 = createTestAccount("scheme1"); + AccountSetupAccountType activity = startActivity(getTestIntent(acct1), null, null); + View exchangeButton = activity.findViewById(R.id.exchange); + assertEquals(View.GONE, exchangeButton.getVisibility()); + } + /** * Create a dummy account with minimal fields */ private Account createTestAccount(String scheme) { Account account = new Account(mContext); - account.setStoreUri(scheme + "://user:pass@server.com:port"); + account.setStoreUri(scheme + "://user:pass@server.com:999"); account.save(mPreferences); mAccounts.add(account); return account;