use of com.microsoft.azure.mobile.ingestion.models.StartServiceLog in project mobile-center-sdk-android by Microsoft.
the class SessionTrackerTest method ignoreStartService.
@Test
public void ignoreStartService() {
Log startServiceLog = spy(new StartServiceLog());
mSessionTracker.onEnqueuingLog(startServiceLog, TEST_GROUP);
verify(mChannel, never()).enqueue(any(Log.class), anyString());
verify(startServiceLog, never()).setSid(any(UUID.class));
}
use of com.microsoft.azure.mobile.ingestion.models.StartServiceLog in project mobile-center-sdk-android by Microsoft.
the class LogSerializerAndroidTest method startServiceLog.
@Test
public void startServiceLog() throws JSONException {
StartServiceLog log = new StartServiceLog();
List<String> services = new ArrayList<>();
services.add("FIRST");
services.add("SECOND");
log.setServices(services);
UUID sid = UUIDUtils.randomUUID();
log.setSid(sid);
/* Verify serialize and deserialize. */
LogSerializer serializer = new DefaultLogSerializer();
serializer.addLogFactory(StartServiceLog.TYPE, new StartServiceLogFactory());
String payload = serializer.serializeLog(log);
Log actualContainer = serializer.deserializeLog(payload);
Assert.assertEquals(log, actualContainer);
}
use of com.microsoft.azure.mobile.ingestion.models.StartServiceLog in project mobile-center-sdk-android by Microsoft.
the class MobileCenter method queueStartService.
/**
* Send started services.
*
* @param services started services.
*/
private synchronized void queueStartService(@NonNull List<String> services) {
StartServiceLog startServiceLog = new StartServiceLog();
startServiceLog.setServices(services);
mChannel.enqueue(startServiceLog, CORE_GROUP);
}
Aggregations