use of com.amazonaws.mobileconnectors.pinpoint.analytics.SessionClient in project aws-sdk-android by aws-amplify.
the class AWSErsLocaleTestBase method setupForRepeatedTestCase.
@Override
public void setupForRepeatedTestCase() {
Context mockAndroidContext = new ContextWithPermissions(new Activity());
AWSCredentialsProvider provider = new AWSCredentialsProvider() {
AWSCredentials creds = new AnonymousAWSCredentials();
@Override
public AWSCredentials getCredentials() {
return creds;
}
@Override
public void refresh() {
}
};
mockConfiguration = mock(AndroidPreferencesConfiguration.class);
PinpointConfiguration options = new PinpointConfiguration(mockAndroidContext, UNIQUE_ID, Regions.US_EAST_1, ChannelType.GCM, provider);
context = new AnalyticsContextBuilder().withSdkInfo(SDK_NAME, SDK_VERSION).withUniqueIdValue(UNIQUE_ID).withContext(RuntimeEnvironment.application.getApplicationContext()).withSystem(new MockSystem("HELLO.world")).withConfiguration(mockConfiguration).build();
AnalyticsClient analyticsClient = new AnalyticsClient(context);
TargetingClient targetingClient = new TargetingClient(context);
context.setAnalyticsClient(analyticsClient);
context.setTargetingClient(targetingClient);
SessionClient isc = new SessionClient(context);
PinpointConfiguration config = new PinpointConfiguration(mockAndroidContext, UNIQUE_ID, Regions.US_EAST_1, ChannelType.GCM, provider);
instance = new PinpointManager(config);
}
use of com.amazonaws.mobileconnectors.pinpoint.analytics.SessionClient in project amplify-android by aws-amplify.
the class AutoSessionTrackerTest method setup.
/**
* Setup dependencies and object under test.
*/
@Before
public void setup() {
// Dependencies
AnalyticsClient analyticsClient = mock(AnalyticsClient.class);
this.sessionClient = mock(SessionClient.class);
// Object under test
this.callbacks = new AutoSessionTracker(analyticsClient, sessionClient);
}
Aggregations