Search in sources :

Example 6 with Authenticator

use of com.vodafone360.people.service.Authenticator in project 360-Engine-for-Android by 360.

the class AuthenticatorTest method testConfirmCredentials.

/***
     * Test the confirmCredentials() method.
     */
@SmallTest
public final void testConfirmCredentials() {
    Authenticator authenticator = new Authenticator(getContext(), mApplication);
    assertNull("Expected confirmCredentials() to return NULL", authenticator.confirmCredentials(null, null, null));
}
Also used : Authenticator(com.vodafone360.people.service.Authenticator) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 7 with Authenticator

use of com.vodafone360.people.service.Authenticator in project 360-Engine-for-Android by 360.

the class AuthenticatorTest method testUpdateCredentials.

/***
     * Test the updateCredentials() method.
     */
@SmallTest
public final void testUpdateCredentials() {
    Authenticator authenticator = new Authenticator(getContext(), mApplication);
    assertNull("Expected updateCredentials() to return NULL", authenticator.updateCredentials(null, null, null, null));
}
Also used : Authenticator(com.vodafone360.people.service.Authenticator) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 8 with Authenticator

use of com.vodafone360.people.service.Authenticator in project 360-Engine-for-Android by 360.

the class AuthenticatorTest method testAuthenticator.

/*
     * ##########  END FRAMEWORK CLASSES.  ##########
     */
/***
     * Test the Authenticator constructor.
     */
@SmallTest
public final void testAuthenticator() {
    Authenticator authenticator = new Authenticator(getContext(), mApplication);
    assertNotNull("Authenticator should not be NULL", authenticator);
}
Also used : Authenticator(com.vodafone360.people.service.Authenticator) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 9 with Authenticator

use of com.vodafone360.people.service.Authenticator in project 360-Engine-for-Android by 360.

the class AuthenticatorTest method testAddAccount.

/***
     * Test the getParcelable() method.
     */
@SmallTest
public final void testAddAccount() {
    Authenticator authenticator = new Authenticator(getContext(), mApplication);
    NativeContactsApi.createInstance(getContext());
    Bundle bundle = authenticator.addAccount(null, null, null, null, null);
    Intent intent = (Intent) bundle.getParcelable(AccountManager.KEY_INTENT);
    assertEquals("Expected a StartActivity Intent", intent.getComponent().getClassName(), "com.vodafone360.people.ui.StartActivity");
    assertNull("Expected a ACTION_ONE_ACCOUNT_ONLY_INTENT action to be NULL", intent.getAction());
}
Also used : Bundle(android.os.Bundle) Intent(android.content.Intent) Authenticator(com.vodafone360.people.service.Authenticator) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

SmallTest (android.test.suitebuilder.annotation.SmallTest)9 Authenticator (com.vodafone360.people.service.Authenticator)9 NetworkErrorException (android.accounts.NetworkErrorException)2 Bundle (android.os.Bundle)2 Intent (android.content.Intent)1 Suppress (android.test.suitebuilder.annotation.Suppress)1 MainApplication (com.vodafone360.people.MainApplication)1 TestStatus (com.vodafone360.people.tests.testutils.TestStatus)1