Search in sources :

Example 1 with SynchronousMobileClient

use of com.amplifyframework.testutils.sync.SynchronousMobileClient in project amplify-android by aws-amplify.

the class RestApiInstrumentationTest method setUp.

/**
 * Configure the Amplify framework and auth.
 * @throws AmplifyException if configuration fails
 * @throws SynchronousMobileClient.MobileClientException If AWS Mobile Client initialization fails
 */
@Before
public void setUp() throws AmplifyException, SynchronousMobileClient.MobileClientException {
    ApiCategory asyncDelegate = TestApiCategory.fromConfiguration(R.raw.amplifyconfiguration);
    api = SynchronousApi.delegatingTo(asyncDelegate);
    SynchronousMobileClient mobileClient = SynchronousMobileClient.instance();
    mobileClient.initialize();
}
Also used : ApiCategory(com.amplifyframework.api.ApiCategory) SynchronousMobileClient(com.amplifyframework.testutils.sync.SynchronousMobileClient) Before(org.junit.Before)

Aggregations

ApiCategory (com.amplifyframework.api.ApiCategory)1 SynchronousMobileClient (com.amplifyframework.testutils.sync.SynchronousMobileClient)1 Before (org.junit.Before)1