use of com.amazonaws.mobileconnectors.pinpoint.analytics.utils.AnalyticsContextBuilder in project aws-sdk-android by aws-amplify.
the class AmazonMonetizationEventBuilderTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
when(mockConfiguration.optString("versionKey", "ver")).thenReturn("ver");
when(mockConfiguration.optBoolean("isAnalyticsEnabled", true)).thenReturn(true);
PinpointContext mockContext = new AnalyticsContextBuilder().withConfiguration(mockConfiguration).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
target = new AnalyticsClient(mockContext);
AnalyticsEvent testEvent = target.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME);
when(mockEventClient.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME)).thenReturn(testEvent);
}
use of com.amazonaws.mobileconnectors.pinpoint.analytics.utils.AnalyticsContextBuilder in project aws-sdk-android by aws-amplify.
the class CustomMonetizationEventBuilderTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
when(mockConfiguration.optString("versionKey", "ver")).thenReturn("ver");
when(mockConfiguration.optBoolean("isAnalyticsEnabled", true)).thenReturn(true);
PinpointContext mockContext = new AnalyticsContextBuilder().withConfiguration(mockConfiguration).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
target = new AnalyticsClient(mockContext);
AnalyticsEvent testEvent = target.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME);
when(mockEventClient.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME)).thenReturn(testEvent);
}
use of com.amazonaws.mobileconnectors.pinpoint.analytics.utils.AnalyticsContextBuilder in project aws-sdk-android by aws-amplify.
the class MonetizationEventBuilderTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
when(mockConfiguration.optString("versionKey", "ver")).thenReturn("ver");
when(mockConfiguration.optBoolean("isAnalyticsEnabled", true)).thenReturn(true);
PinpointContext mockContext = new AnalyticsContextBuilder().withConfiguration(mockConfiguration).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
target = new AnalyticsClient(mockContext);
AnalyticsEvent testEvent = target.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME);
when(mockEventClient.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME)).thenReturn(testEvent);
}
use of com.amazonaws.mobileconnectors.pinpoint.analytics.utils.AnalyticsContextBuilder in project aws-sdk-android by aws-amplify.
the class VirtualMonetizationEventBuilderTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
when(mockConfiguration.optString("versionKey", "ver")).thenReturn("ver");
when(mockConfiguration.optBoolean("isAnalyticsEnabled", true)).thenReturn(true);
PinpointContext mockContext = new AnalyticsContextBuilder().withConfiguration(mockConfiguration).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
target = new AnalyticsClient(mockContext);
AnalyticsEvent testEvent = target.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME);
when(mockEventClient.createEvent(MonetizationEventBuilder.PURCHASE_EVENT_NAME)).thenReturn(testEvent);
}
Aggregations