use of com.amazonaws.mobileconnectors.pinpoint.internal.core.system.MockDeviceDetails in project aws-sdk-android by aws-amplify.
the class EndpointProfileTest method setup.
@Before
public void setup() {
testDeviceDetails = new MockDeviceDetails();
mockContext = new AnalyticsContextBuilder().withSdkInfo(SDK_NAME, SDK_VERSION).withUniqueIdValue(UNIQUE_ID).withDeviceDetails(testDeviceDetails).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
target = new EndpointProfile(mockContext);
}
use of com.amazonaws.mobileconnectors.pinpoint.internal.core.system.MockDeviceDetails in project aws-sdk-android by aws-amplify.
the class TargetingClientTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
testDeviceDetails = new MockDeviceDetails();
mockContext = new AnalyticsContextBuilder().withSdkInfo(SDK_NAME, SDK_VERSION).withUniqueIdValue(UNIQUE_ID).withDeviceDetails(testDeviceDetails).withPinpointServiceClient(mockPinpointServiceClient).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
targetingClient = new TargetingClient(mockContext, mockPinpointExecutor);
}
use of com.amazonaws.mobileconnectors.pinpoint.internal.core.system.MockDeviceDetails in project aws-sdk-android by aws-amplify.
the class AnalyticsEventTest method setup.
@Before
public void setup() {
testDeviceDetails = new MockDeviceDetails();
PinpointContext mockContext = new AnalyticsContextBuilder().withSdkInfo(SDK_NAME, SDK_VERSION).withUniqueIdValue(UNIQUE_ID).withDeviceDetails(testDeviceDetails).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
target = AnalyticsEvent.newInstance(mockContext, SESSION_ID, SESSION_START, SESSION_END, SESSION_DURATION, TIME_STAMP, EVENT_NAME);
assertEquals(EVENT_NAME, target.getEventType());
assertEquals(UNIQUE_ID, target.getUniqueId());
assertEquals(TIME_STAMP, target.getEventTimestamp());
assertEquals(SDK_NAME, target.getSdkName());
assertEquals(SDK_VERSION, target.getSdkVersion());
assertEquals(0, target.getAllAttributes().size());
assertEquals(0, target.getAllMetrics().size());
}
use of com.amazonaws.mobileconnectors.pinpoint.internal.core.system.MockDeviceDetails in project aws-sdk-android by aws-amplify.
the class EventRecorderTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
testDeviceDetails = new MockDeviceDetails();
mockContext = new AnalyticsContextBuilder().withSdkInfo(SDK_NAME, SDK_VERSION).withUniqueIdValue(UNIQUE_ID).withDeviceDetails(testDeviceDetails).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
analyticsEvent = AnalyticsEvent.newInstance(mockContext, SESSION_ID, SESSION_START, SESSION_END, SESSION_DURATION, TIME_STAMP, EVENT_NAME);
analyticsEvent.addAttribute("key1", "value1");
analyticsEvent.addAttribute("key2", "value2");
endpointProfile = new EndpointProfile(mockContext);
dbUtil = new PinpointDBUtil(RuntimeEnvironment.application.getApplicationContext());
eventRecorder = new EventRecorder(mockContext, dbUtil, submissionRunnable);
}
use of com.amazonaws.mobileconnectors.pinpoint.internal.core.system.MockDeviceDetails in project aws-sdk-android by aws-amplify.
the class PinpointDBUtilTest method setup.
@Before
public void setup() {
testDeviceDetails = new MockDeviceDetails();
mockContext = new AnalyticsContextBuilder().withSdkInfo(SDK_NAME, SDK_VERSION).withUniqueIdValue(UNIQUE_ID).withDeviceDetails(testDeviceDetails).withContext(RuntimeEnvironment.application.getApplicationContext()).build();
dbUtil = new PinpointDBUtil(RuntimeEnvironment.application.getApplicationContext());
}
Aggregations