use of com.amazonaws.mobileconnectors.pinpoint.internal.core.system.MockSystem in project aws-sdk-android by aws-amplify.
the class BaiduNotificationClientTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
final Context roboContext = RuntimeEnvironment.application.getApplicationContext();
spiedRoboContext = Mockito.spy(roboContext);
mockPinpointContext = new AnalyticsContextBuilder().withSystem(new MockSystem("JIMMY_CRACKED_CORN.and")).withConfiguration(mockConfiguration).withContext(spiedRoboContext).build();
analyticsClient = new AnalyticsClient(mockPinpointContext);
Whitebox.setInternalState(analyticsClient, "eventRecorder", mockEventRecorder);
when(mockConfiguration.optBoolean("isAnalyticsEnabled", true)).thenReturn(true);
when(mockPinpointContext.getAnalyticsClient()).thenReturn(analyticsClient);
// target.setSessionClient(new SessionClient(mockContext, mockEventClient, mockTargetingClient,
// new TestSessionStore(), false));
when(mockPinpointContext.getTargetingClient()).thenReturn(mockTargetingClient);
when(mockPinpointContext.getConfiguration()).thenReturn(mockConfiguration);
when(mockPinpointContext.getPinpointConfiguration()).thenReturn(mockPinpointConfiguration);
target = NotificationClient.createClient(mockPinpointContext, ChannelType.BAIDU);
}
Aggregations