Fix failing tests in AccountSetupExchange

A recent change was short-circuiting the logic that loads
the UI from the account.  This fix simply resets the flag
so the test can reload the UI multiple times as it tests things.

Change-Id: I7cc53e2766b78172e5a7b05088e94fdec99ae0d6
This commit is contained in:
Andy Stadler 2010-12-08 00:22:23 -08:00
parent 4d02297f4a
commit 3a4b9e140e
2 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
// Support for lifecycle
private boolean mStarted;
private boolean mLoaded;
/* package */ boolean mLoaded;
private String mCacheLoginCredential;
/**

View File

@ -188,6 +188,7 @@ public class AccountSetupExchangeTests extends
"eas", "hostauth", 1, false, mActivity.getBaseContext());
account.mHostAuthRecv.mFlags |= HostAuth.FLAG_SSL;
account.mHostAuthRecv.mFlags &= ~HostAuth.FLAG_TRUST_ALL_CERTIFICATES;
mActivity.mFragment.mLoaded = false;
boolean loadResult = mActivity.mFragment.loadSettings(account);
assertTrue(loadResult);
assertTrue(mSslRequiredCheckbox.isChecked());
@ -197,6 +198,7 @@ public class AccountSetupExchangeTests extends
// Setup host auth with variants of SSL enabled and check. This also enables the
// "trust certificates" checkbox (not checked, but visible now).
account.mHostAuthRecv.mFlags |= HostAuth.FLAG_TRUST_ALL_CERTIFICATES;
mActivity.mFragment.mLoaded = false;
loadResult = mActivity.mFragment.loadSettings(account);
assertTrue(loadResult);
assertTrue(mSslRequiredCheckbox.isChecked());
@ -205,6 +207,7 @@ public class AccountSetupExchangeTests extends
// A simple test of an incomplete account, which will fail validation
account.mHostAuthRecv.mPassword = "";
mActivity.mFragment.mLoaded = false;
loadResult = mActivity.mFragment.loadSettings(account);
assertFalse(loadResult);
}