Search in sources :

Example 6 with CategoryConfiguration

use of com.amplifyframework.core.category.CategoryConfiguration in project amplify-android by aws-amplify.

the class HybridTemporalSyncInstrumentationTest method setup.

/**
 * DataStore is configured with a real AppSync endpoint. API and AppSync clients
 * are used to arrange/validate state before/after exercising the DataStore. The {@link Amplify}
 * facade is intentionally *not* used, since we don't want to pollute the instrumentation
 * test process with global state. We need an *instance* of the DataStore.
 * @throws AmplifyException On failure to configure Amplify, API/DataStore categories.
 */
@Ignore("It passes. Not automating due to operational concerns as noted in class-level @Ignore.")
@Before
public void setup() throws AmplifyException {
    Amplify.addPlugin(new AndroidLoggingPlugin(LogLevel.VERBOSE));
    StrictMode.enable();
    Context context = getApplicationContext();
    @RawRes int configResourceId = Resources.getRawResourceId(context, "amplifyconfiguration");
    // Setup an API
    CategoryConfiguration apiCategoryConfiguration = AmplifyConfiguration.fromConfigFile(context, configResourceId).forCategoryType(CategoryType.API);
    ApiCategory apiCategory = new ApiCategory();
    apiCategory.addPlugin(new AWSApiPlugin());
    apiCategory.configure(apiCategoryConfiguration, context);
    // To arrange and verify state, we need to access the supporting AppSync API
    api = SynchronousApi.delegatingTo(apiCategory);
    appSync = SynchronousAppSync.using(AppSyncClient.via(apiCategory));
    SchemaProvider schemaProvider = SchemaLoader.loadFromAssetsDirectory("schemas/meeting");
    DataStoreCategory dataStoreCategory = DataStoreCategoryConfigurator.begin().api(apiCategory).clearDatabase(true).context(context).modelProvider(schemaProvider).resourceId(configResourceId).timeout(TIMEOUT_SECONDS, TimeUnit.SECONDS).finish();
    AWSDataStorePlugin plugin = (AWSDataStorePlugin) dataStoreCategory.getPlugin("awsDataStorePlugin");
    hybridBehaviors = SynchronousHybridBehaviors.delegatingTo(plugin);
    // Get a handle to the Meeting model schema that we loaded into the DataStore in @Before.
    String modelName = Meeting.class.getSimpleName();
    modelSchema = schemaProvider.modelSchemas().get(modelName);
}
Also used : Context(android.content.Context) ApplicationProvider.getApplicationContext(androidx.test.core.app.ApplicationProvider.getApplicationContext) AWSApiPlugin(com.amplifyframework.api.aws.AWSApiPlugin) RawRes(androidx.annotation.RawRes) CategoryConfiguration(com.amplifyframework.core.category.CategoryConfiguration) ApiCategory(com.amplifyframework.api.ApiCategory) AndroidLoggingPlugin(com.amplifyframework.logging.AndroidLoggingPlugin) Before(org.junit.Before) Ignore(org.junit.Ignore)

Example 7 with CategoryConfiguration

use of com.amplifyframework.core.category.CategoryConfiguration in project amplify-android by aws-amplify.

the class MultiAuthSyncEngineInstrumentationTest method configure.

/**
 * Method used to configure each scenario.
 * @param modelType The model type.
 * @param signInToCognito Does the test scenario require the user to be logged in with user pools.
 * @param signInWithOidc Does the test scenario require the user to be logged in with an OIDC provider.
 * @param expectedAuthType The auth type that should succeed for the test.
 * @throws AmplifyException No expected.
 * @throws IOException Not expected.
 */
private void configure(Class<? extends Model> modelType, boolean signInToCognito, boolean signInWithOidc, AuthorizationType expectedAuthType) throws AmplifyException, IOException {
    Amplify.addPlugin(new AndroidLoggingPlugin(LogLevel.VERBOSE));
    String tag = modelType.getSimpleName();
    MultiAuthTestModelProvider modelProvider = MultiAuthTestModelProvider.getInstance(Collections.singletonList(modelType));
    SchemaRegistry schemaRegistry = SchemaRegistry.instance();
    ModelSchema modelSchema = ModelSchema.fromModelClass(modelType);
    schemaRegistry.register(modelType.getSimpleName(), modelSchema);
    StrictMode.enable();
    Context context = getApplicationContext();
    @RawRes int configResourceId = Resources.getRawResourceId(context, "amplifyconfiguration");
    AmplifyConfiguration amplifyConfiguration = AmplifyConfiguration.fromConfigFile(context, configResourceId);
    readCredsFromConfig(context);
    // Setup an auth plugin
    CategoryConfiguration authCategoryConfiguration = amplifyConfiguration.forCategoryType(CategoryType.AUTH);
    // Turn off persistence so the mobile client's state for one test does not interfere with the others.
    try {
        authCategoryConfiguration.getPluginConfig("awsCognitoAuthPlugin").getJSONObject("Auth").getJSONObject("Default").put("Persistence", false);
    } catch (JSONException exception) {
        exception.printStackTrace();
        fail();
        return;
    }
    AuthCategory authCategory = new AuthCategory();
    AWSCognitoAuthPlugin authPlugin = new AWSCognitoAuthPlugin();
    authCategory.addPlugin(authPlugin);
    authCategory.configure(authCategoryConfiguration, context);
    auth = SynchronousAuth.delegatingTo(authCategory);
    if (signInToCognito) {
        Log.v(tag, "Test requires signIn.");
        AuthSignInResult authSignInResult = auth.signIn(cognitoUser, cognitoPassword);
        if (!authSignInResult.isSignInComplete()) {
            fail("Unable to complete initial sign-in");
        }
    }
    if (signInWithOidc) {
        oidcLogin();
        if (token.get() == null) {
            fail("Unable to autenticate with OIDC provider");
        }
    }
    // Setup an API
    DefaultCognitoUserPoolsAuthProvider cognitoProvider = new DefaultCognitoUserPoolsAuthProvider(authPlugin.getEscapeHatch());
    CategoryConfiguration apiCategoryConfiguration = amplifyConfiguration.forCategoryType(CategoryType.API);
    ApiAuthProviders apiAuthProviders = ApiAuthProviders.builder().cognitoUserPoolsAuthProvider(cognitoProvider).awsCredentialsProvider(authPlugin.getEscapeHatch()).oidcAuthProvider(token::get).build();
    ApiCategory apiCategory = new ApiCategory();
    requestInterceptor = new HttpRequestInterceptor(expectedAuthType);
    apiCategory.addPlugin(AWSApiPlugin.builder().configureClient("DataStoreIntegTestsApi", okHttpClientBuilder -> okHttpClientBuilder.addInterceptor(requestInterceptor)).apiAuthProviders(apiAuthProviders).build());
    apiCategory.configure(apiCategoryConfiguration, context);
    api = SynchronousApi.delegatingTo(apiCategory);
    // Setup DataStore
    DataStoreConfiguration dsConfig = DataStoreConfiguration.builder().errorHandler(exception -> Log.e(tag, "DataStore error handler received an error.", exception)).syncExpression(modelSchema.getName(), () -> Where.id("FAKE_ID").getQueryPredicate()).build();
    CategoryConfiguration dataStoreCategoryConfiguration = AmplifyConfiguration.fromConfigFile(context, configResourceId).forCategoryType(CategoryType.DATASTORE);
    String databaseName = "IntegTest" + modelType.getSimpleName() + ".db";
    SQLiteStorageAdapter sqLiteStorageAdapter = TestStorageAdapter.create(schemaRegistry, modelProvider, databaseName);
    AWSDataStorePlugin awsDataStorePlugin = AWSDataStorePlugin.builder().storageAdapter(sqLiteStorageAdapter).modelProvider(modelProvider).apiCategory(apiCategory).authModeStrategy(AuthModeStrategyType.MULTIAUTH).schemaRegistry(schemaRegistry).dataStoreConfiguration(dsConfig).build();
    DataStoreCategory dataStoreCategory = new DataStoreCategory();
    dataStoreCategory.addPlugin(awsDataStorePlugin);
    dataStoreCategory.configure(dataStoreCategoryConfiguration, context);
    dataStoreCategory.initialize(context);
    dataStore = SynchronousDataStore.delegatingTo(dataStoreCategory);
}
Also used : MultiAuthTestModelProvider(com.amplifyframework.testmodels.multiauth.MultiAuthTestModelProvider) ApplicationProvider.getApplicationContext(androidx.test.core.app.ApplicationProvider.getApplicationContext) Context(android.content.Context) AmplifyException(com.amplifyframework.AmplifyException) ApplicationProvider.getApplicationContext(androidx.test.core.app.ApplicationProvider.getApplicationContext) AuthorizationType(com.amplifyframework.api.aws.AuthorizationType) PrivatePrivatePublicUPIAMIAMPost(com.amplifyframework.testmodels.multiauth.PrivatePrivatePublicUPIAMIAMPost) PublicPublicIAMAPIPost(com.amplifyframework.testmodels.multiauth.PublicPublicIAMAPIPost) AuthSignOutOptions(com.amplifyframework.auth.options.AuthSignOutOptions) DataStoreHubEventFilters.publicationOf(com.amplifyframework.datastore.DataStoreHubEventFilters.publicationOf) AndroidLoggingPlugin(com.amplifyframework.logging.AndroidLoggingPlugin) OwnerPublicUPAPIPost(com.amplifyframework.testmodels.multiauth.OwnerPublicUPAPIPost) JSONException(org.json.JSONException) AWSApiPlugin(com.amplifyframework.api.aws.AWSApiPlugin) JSONObject(org.json.JSONObject) AmplifyConfiguration(com.amplifyframework.core.AmplifyConfiguration) Map(java.util.Map) PrivateUPPost(com.amplifyframework.testmodels.multiauth.PrivateUPPost) Assert.fail(org.junit.Assert.fail) Log(android.util.Log) ResponseBody(okhttp3.ResponseBody) MultiAuthTestModelProvider(com.amplifyframework.testmodels.multiauth.MultiAuthTestModelProvider) Interceptor(okhttp3.Interceptor) AfterClass(org.junit.AfterClass) Request(okhttp3.Request) GroupUPPost(com.amplifyframework.testmodels.multiauth.GroupUPPost) HubChannel(com.amplifyframework.hub.HubChannel) SerializedModel(com.amplifyframework.core.model.SerializedModel) OwnerPublicOIDAPIPost(com.amplifyframework.testmodels.multiauth.OwnerPublicOIDAPIPost) OwnerPrivateUPIAMPost(com.amplifyframework.testmodels.multiauth.OwnerPrivateUPIAMPost) DefaultCognitoUserPoolsAuthProvider(com.amplifyframework.api.aws.sigv4.DefaultCognitoUserPoolsAuthProvider) UUID(java.util.UUID) ApiCategory(com.amplifyframework.api.ApiCategory) PrivatePublicComboUPPost(com.amplifyframework.testmodels.multiauth.PrivatePublicComboUPPost) Logger(com.amplifyframework.logging.Logger) CognitoJWTParser(com.amazonaws.mobileconnectors.cognitoidentityprovider.util.CognitoJWTParser) Assert.assertFalse(org.junit.Assert.assertFalse) RandomString(com.amplifyframework.testutils.random.RandomString) SynchronousAuth(com.amplifyframework.testutils.sync.SynchronousAuth) LogLevel(com.amplifyframework.logging.LogLevel) PublicAPIPost(com.amplifyframework.testmodels.multiauth.PublicAPIPost) Context(android.content.Context) GroupPrivatePublicUPIAMAPIPost(com.amplifyframework.testmodels.multiauth.GroupPrivatePublicUPIAMAPIPost) AuthCategory(com.amplifyframework.auth.AuthCategory) HashMap(java.util.HashMap) ApiAuthProviders(com.amplifyframework.api.aws.ApiAuthProviders) Resources(com.amplifyframework.testutils.Resources) HubAccumulator(com.amplifyframework.testutils.HubAccumulator) SynchronousApi(com.amplifyframework.testutils.sync.SynchronousApi) IdToken(com.google.auth.oauth2.IdToken) AtomicReference(java.util.concurrent.atomic.AtomicReference) Headers(okhttp3.Headers) RequestBody(okhttp3.RequestBody) SchemaRegistry(com.amplifyframework.core.model.SchemaRegistry) RawRes(androidx.annotation.RawRes) PrivatePublicUPIAMPost(com.amplifyframework.testmodels.multiauth.PrivatePublicUPIAMPost) AuthSignInResult(com.amplifyframework.auth.result.AuthSignInResult) Author(com.amplifyframework.testmodels.commentsblog.Author) ModelSchema(com.amplifyframework.core.model.ModelSchema) PrivatePublicComboAPIPost(com.amplifyframework.testmodels.multiauth.PrivatePublicComboAPIPost) Response(okhttp3.Response) CategoryConfiguration(com.amplifyframework.core.category.CategoryConfiguration) PublicIAMPost(com.amplifyframework.testmodels.multiauth.PublicIAMPost) Amplify(com.amplifyframework.core.Amplify) PrivatePrivatePublicUPIAMAPIPost(com.amplifyframework.testmodels.multiauth.PrivatePrivatePublicUPIAMAPIPost) SynchronousDataStore(com.amplifyframework.testutils.sync.SynchronousDataStore) Buffer(okio.Buffer) CategoryType(com.amplifyframework.core.category.CategoryType) GroupPrivateUPIAMPost(com.amplifyframework.testmodels.multiauth.GroupPrivateUPIAMPost) PrivatePublicUPAPIPost(com.amplifyframework.testmodels.multiauth.PrivatePublicUPAPIPost) Model(com.amplifyframework.core.model.Model) AWSCognitoAuthPlugin(com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin) Test(org.junit.Test) IOException(java.io.IOException) Where(com.amplifyframework.core.model.query.Where) SQLiteStorageAdapter(com.amplifyframework.datastore.storage.sqlite.SQLiteStorageAdapter) GroupPublicUPIAMPost(com.amplifyframework.testmodels.multiauth.GroupPublicUPIAMPost) PrivatePrivateUPIAMPost(com.amplifyframework.testmodels.multiauth.PrivatePrivateUPIAMPost) TimeUnit(java.util.concurrent.TimeUnit) AuthModeStrategyType(com.amplifyframework.api.aws.AuthModeStrategyType) OwnerOIDCPost(com.amplifyframework.testmodels.multiauth.OwnerOIDCPost) OwnerPrivatePublicUPIAMAPIPost(com.amplifyframework.testmodels.multiauth.OwnerPrivatePublicUPIAMAPIPost) TestStorageAdapter(com.amplifyframework.datastore.storage.sqlite.TestStorageAdapter) PrivatePublicPublicUPAPIIAMPost(com.amplifyframework.testmodels.multiauth.PrivatePublicPublicUPAPIIAMPost) Resources.readJsonResourceFromId(com.amplifyframework.core.Resources.readJsonResourceFromId) DataStoreHubEventFilters.networkStatusFailure(com.amplifyframework.datastore.DataStoreHubEventFilters.networkStatusFailure) GroupPublicUPAPIPost(com.amplifyframework.testmodels.multiauth.GroupPublicUPAPIPost) OwnerUPPost(com.amplifyframework.testmodels.multiauth.OwnerUPPost) Collections(java.util.Collections) ServiceAccountCredentials(com.google.auth.oauth2.ServiceAccountCredentials) JSONArray(org.json.JSONArray) RawRes(androidx.annotation.RawRes) AmplifyConfiguration(com.amplifyframework.core.AmplifyConfiguration) DefaultCognitoUserPoolsAuthProvider(com.amplifyframework.api.aws.sigv4.DefaultCognitoUserPoolsAuthProvider) SQLiteStorageAdapter(com.amplifyframework.datastore.storage.sqlite.SQLiteStorageAdapter) CategoryConfiguration(com.amplifyframework.core.category.CategoryConfiguration) JSONException(org.json.JSONException) RandomString(com.amplifyframework.testutils.random.RandomString) AWSCognitoAuthPlugin(com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin) AndroidLoggingPlugin(com.amplifyframework.logging.AndroidLoggingPlugin) ModelSchema(com.amplifyframework.core.model.ModelSchema) AuthCategory(com.amplifyframework.auth.AuthCategory) ApiCategory(com.amplifyframework.api.ApiCategory) ApiAuthProviders(com.amplifyframework.api.aws.ApiAuthProviders) AuthSignInResult(com.amplifyframework.auth.result.AuthSignInResult) SchemaRegistry(com.amplifyframework.core.model.SchemaRegistry)

Example 8 with CategoryConfiguration

use of com.amplifyframework.core.category.CategoryConfiguration in project amplify-android by aws-amplify.

the class BasicCloudSyncInstrumentationTest method setup.

/**
 * Once, before any/all tests in this class, setup miscellaneous dependencies,
 * including synchronous API, AppSync, and DataStore interfaces. The API and AppSync instances
 * are used to arrange/validate data. The DataStore interface will delegate to an
 * {@link AWSDataStorePlugin}, which is the thing we're actually testing.
 * @throws AmplifyException On failure to read config, setup API or DataStore categories
 */
@BeforeClass
public static void setup() throws AmplifyException {
    Amplify.addPlugin(new AndroidLoggingPlugin(LogLevel.VERBOSE));
    StrictMode.enable();
    Context context = getApplicationContext();
    @RawRes int configResourceId = Resources.getRawResourceId(context, "amplifyconfiguration");
    // Setup an API
    CategoryConfiguration apiCategoryConfiguration = AmplifyConfiguration.fromConfigFile(context, configResourceId).forCategoryType(CategoryType.API);
    ApiCategory apiCategory = new ApiCategory();
    apiCategory.addPlugin(new AWSApiPlugin());
    apiCategory.configure(apiCategoryConfiguration, context);
    // To arrange and verify state, we need to access the supporting AppSync API
    api = SynchronousApi.delegatingTo(apiCategory);
    appSync = SynchronousAppSync.using(AppSyncClient.via(apiCategory));
    long tenMinutesAgo = new Date().getTime() - TimeUnit.MINUTES.toMillis(10);
    Temporal.DateTime tenMinutesAgoDateTime = new Temporal.DateTime(new Date(tenMinutesAgo), 0);
    DataStoreCategory dataStoreCategory = DataStoreCategoryConfigurator.begin().api(apiCategory).clearDatabase(true).context(context).modelProvider(AmplifyModelProvider.getInstance()).resourceId(configResourceId).timeout(TIMEOUT_SECONDS, TimeUnit.SECONDS).dataStoreConfiguration(DataStoreConfiguration.builder().syncExpression(BlogOwner.class, () -> BlogOwner.CREATED_AT.gt(tenMinutesAgoDateTime)).syncExpression(Blog.class, () -> Blog.CREATED_AT.gt(tenMinutesAgoDateTime)).syncExpression(Post.class, () -> Post.CREATED_AT.gt(tenMinutesAgoDateTime)).syncExpression(Comment.class, () -> Comment.CREATED_AT.gt(tenMinutesAgoDateTime)).syncExpression(Author.class, () -> Author.CREATED_AT.gt(tenMinutesAgoDateTime)).syncExpression(PostAuthorJoin.class, () -> PostAuthorJoin.CREATED_AT.gt(tenMinutesAgoDateTime)).build()).finish();
    dataStore = SynchronousDataStore.delegatingTo(dataStoreCategory);
}
Also used : ApplicationProvider.getApplicationContext(androidx.test.core.app.ApplicationProvider.getApplicationContext) Context(android.content.Context) Comment(com.amplifyframework.testmodels.commentsblog.Comment) RawRes(androidx.annotation.RawRes) CategoryConfiguration(com.amplifyframework.core.category.CategoryConfiguration) PostAuthorJoin(com.amplifyframework.testmodels.commentsblog.PostAuthorJoin) AndroidLoggingPlugin(com.amplifyframework.logging.AndroidLoggingPlugin) Date(java.util.Date) AWSApiPlugin(com.amplifyframework.api.aws.AWSApiPlugin) Temporal(com.amplifyframework.core.model.temporal.Temporal) ApiCategory(com.amplifyframework.api.ApiCategory) Blog(com.amplifyframework.testmodels.commentsblog.Blog) BeforeClass(org.junit.BeforeClass)

Example 9 with CategoryConfiguration

use of com.amplifyframework.core.category.CategoryConfiguration in project amplify-android by aws-amplify.

the class DataStoreCategoryConfigurator method buildCategory.

private DataStoreCategory buildCategory() throws AmplifyException {
    HubAccumulator initializationObserver = HubAccumulator.create(HubChannel.DATASTORE, DataStoreChannelEventName.READY, 1).start();
    CategoryConfiguration dataStoreCategoryConfiguration = AmplifyConfiguration.fromConfigFile(context, resourceId).forCategoryType(CategoryType.DATASTORE);
    AWSDataStorePlugin awsDataStorePlugin = AWSDataStorePlugin.builder().modelProvider(modelProvider).apiCategory(api).dataStoreConfiguration(dataStoreConfiguration).build();
    DataStoreCategory dataStoreCategory = new DataStoreCategory();
    dataStoreCategory.addPlugin(awsDataStorePlugin);
    dataStoreCategory.configure(dataStoreCategoryConfiguration, context);
    dataStoreCategory.initialize(context);
    dataStoreCategory.start(NoOpAction.create(), NoOpConsumer.create());
    initializationObserver.await(timeoutAmount, timeoutUnit);
    return dataStoreCategory;
}
Also used : CategoryConfiguration(com.amplifyframework.core.category.CategoryConfiguration) HubAccumulator(com.amplifyframework.testutils.HubAccumulator)

Example 10 with CategoryConfiguration

use of com.amplifyframework.core.category.CategoryConfiguration in project amplify-android by aws-amplify.

the class RxAmplifyTest method canAddPluginsAndConfigure.

/**
 * Calling {@link RxAmplify#addPlugin(Plugin)} and {@link RxAmplify#configure(AmplifyConfiguration, Context)}
 * will pass config JSON down into the plugin via its {@link Plugin#configure(JSONObject, Context)}
 * method.
 * @throws AmplifyException Not exected; possible from RxAmplilfy's addPlugin(), configure().
 * @throws JSONException Not expected; on failure to arrange test JSON inputs.
 */
@SuppressWarnings("unchecked")
@Test
public void canAddPluginsAndConfigure() throws AmplifyException, JSONException {
    // Setup a mock plugin, add it to Amplify.
    CategoryType categoryType = CategoryType.STORAGE;
    String pluginKey = RandomString.string();
    Plugin<Void> one = mock(Plugin.class);
    when(one.getPluginKey()).thenReturn(pluginKey);
    when(one.getCategoryType()).thenReturn(categoryType);
    RxAmplify.addPlugin(one);
    // Configure Amplify, with a config to match the plugin above.
    Map<String, CategoryConfiguration> categoryConfigs = new HashMap<>();
    String categoryName = categoryType.getConfigurationKey();
    CategoryConfiguration categoryConfig = new DataStoreCategoryConfiguration();
    JSONObject pluginJson = new JSONObject().put("someKey", "someVal");
    categoryConfig.populateFromJSON(new JSONObject().put("plugins", new JSONObject().put(pluginKey, pluginJson)));
    categoryConfigs.put(categoryName, categoryConfig);
    AmplifyConfiguration config = new AmplifyConfiguration(categoryConfigs);
    Context mockContext = mock(Context.class);
    when(mockContext.getApplicationContext()).thenReturn(mockContext);
    when(mockContext.getApplicationInfo()).thenReturn(new ApplicationInfo());
    RxAmplify.configure(config, mockContext);
    // Validate that the plugin gets configured with the provided JSON
    ArgumentCaptor<JSONObject> configJsonCapture = ArgumentCaptor.forClass(JSONObject.class);
    verify(one).configure(configJsonCapture.capture(), any(Context.class));
    assertEquals(pluginJson, configJsonCapture.getValue());
}
Also used : DataStoreCategoryConfiguration(com.amplifyframework.datastore.DataStoreCategoryConfiguration) Context(android.content.Context) AmplifyConfiguration(com.amplifyframework.core.AmplifyConfiguration) HashMap(java.util.HashMap) DataStoreCategoryConfiguration(com.amplifyframework.datastore.DataStoreCategoryConfiguration) CategoryConfiguration(com.amplifyframework.core.category.CategoryConfiguration) ApplicationInfo(android.content.pm.ApplicationInfo) CategoryType(com.amplifyframework.core.category.CategoryType) RandomString(com.amplifyframework.testutils.random.RandomString) JSONObject(org.json.JSONObject) Test(org.junit.Test)

Aggregations

CategoryConfiguration (com.amplifyframework.core.category.CategoryConfiguration)12 ApiCategory (com.amplifyframework.api.ApiCategory)6 Context (android.content.Context)5 RawRes (androidx.annotation.RawRes)4 ApplicationProvider.getApplicationContext (androidx.test.core.app.ApplicationProvider.getApplicationContext)4 AmplifyException (com.amplifyframework.AmplifyException)4 AWSApiPlugin (com.amplifyframework.api.aws.AWSApiPlugin)4 AndroidLoggingPlugin (com.amplifyframework.logging.AndroidLoggingPlugin)4 CategoryType (com.amplifyframework.core.category.CategoryType)3 HashMap (java.util.HashMap)3 DefaultCognitoUserPoolsAuthProvider (com.amplifyframework.api.aws.sigv4.DefaultCognitoUserPoolsAuthProvider)2 AuthCategory (com.amplifyframework.auth.AuthCategory)2 AmplifyConfiguration (com.amplifyframework.core.AmplifyConfiguration)2 PredictionsCategory (com.amplifyframework.predictions.PredictionsCategory)2 HubAccumulator (com.amplifyframework.testutils.HubAccumulator)2 RandomString (com.amplifyframework.testutils.random.RandomString)2 JSONObject (org.json.JSONObject)2 Before (org.junit.Before)2 Ignore (org.junit.Ignore)2 Test (org.junit.Test)2