DO NOT MERGE Remove test code

Bug # 2092944
This commit is contained in:
Andrew Stadler 2009-09-01 14:46:27 -07:00 committed by Jean-Baptiste Queru
parent 629e18ad86
commit fe5ed7b4b5
3 changed files with 17 additions and 7 deletions

View File

@ -33,5 +33,5 @@
<sender scheme="smtp" class="com.android.email.mail.transport.SmtpSender" /> <sender scheme="smtp" class="com.android.email.mail.transport.SmtpSender" />
<!-- This is here for temporary demo purposes only. Do not ship with this. --> <!-- This is here for temporary demo purposes only. Do not ship with this. -->
<sender scheme="eas" class="com.android.email.mail.exchange.ExchangeSenderExample" /> <!-- sender scheme="eas" class="com.android.email.mail.exchange.ExchangeSenderExample" -->
</senders> </senders>

View File

@ -35,6 +35,6 @@
<store scheme="imap" class="com.android.email.mail.store.ImapStore" /> <store scheme="imap" class="com.android.email.mail.store.ImapStore" />
<!-- This is here for temporary demo purposes only. Do not ship with this. --> <!-- This is here for temporary demo purposes only. Do not ship with this. -->
<store scheme="eas" class="com.android.email.mail.exchange.ExchangeStoreExample" <!-- store scheme="eas" class="com.android.email.mail.exchange.ExchangeStoreExample"
push="true" visibleLimitDefault="-1" visibleLimitIncrement="-1" accountInstanceLimit="1" /> push="true" visibleLimitDefault="-1" visibleLimitIncrement="-1" accountInstanceLimit="1" -->
</stores> </stores>

View File

@ -18,19 +18,19 @@ package com.android.email.activity.setup;
import com.android.email.Account; import com.android.email.Account;
import com.android.email.Preferences; import com.android.email.Preferences;
import com.android.email.R;
import com.android.email.mail.Store; import com.android.email.mail.Store;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.test.ActivityUnitTestCase; import android.test.ActivityUnitTestCase;
import android.test.suitebuilder.annotation.SmallTest; import android.test.suitebuilder.annotation.SmallTest;
import android.view.View;
import java.util.HashSet; import java.util.HashSet;
/** /**
* This is a series of unit tests for the AccountSetupAccountType class. * 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 @SmallTest
public class AccountSetupAccountTypeUnitTests public class AccountSetupAccountTypeUnitTests
@ -91,13 +91,23 @@ public class AccountSetupAccountTypeUnitTests
info.mAccountInstanceLimit = 2; info.mAccountInstanceLimit = 2;
assertFalse("limit, reached", activity.checkAccountInstanceLimit(info)); 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 * Create a dummy account with minimal fields
*/ */
private Account createTestAccount(String scheme) { private Account createTestAccount(String scheme) {
Account account = new Account(mContext); Account account = new Account(mContext);
account.setStoreUri(scheme + "://user:pass@server.com:port"); account.setStoreUri(scheme + "://user:pass@server.com:999");
account.save(mPreferences); account.save(mPreferences);
mAccounts.add(account); mAccounts.add(account);
return account; return account;