Search in sources :

Example 1 with CommonSchemaEventLogFactory

use of com.microsoft.appcenter.analytics.ingestion.models.one.json.CommonSchemaEventLogFactory in project mobile-center-sdk-android by Microsoft.

the class EventLogFactoryTest method dontConvertEventWithoutTargetTokens.

@Test
public void dontConvertEventWithoutTargetTokens() {
    /* Create event log with just a name and no target. */
    EventLog log = new EventLog();
    log.setName("test");
    Collection<CommonSchemaLog> convertedLogs = new CommonSchemaEventLogFactory().toCommonSchemaLogs(log);
    assertNotNull(convertedLogs);
    assertEquals(0, convertedLogs.size());
}
Also used : EventLog(com.microsoft.appcenter.analytics.ingestion.models.EventLog) CommonSchemaLog(com.microsoft.appcenter.ingestion.models.one.CommonSchemaLog) CommonSchemaEventLogFactory(com.microsoft.appcenter.analytics.ingestion.models.one.json.CommonSchemaEventLogFactory) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

EventLog (com.microsoft.appcenter.analytics.ingestion.models.EventLog)1 CommonSchemaEventLogFactory (com.microsoft.appcenter.analytics.ingestion.models.one.json.CommonSchemaEventLogFactory)1 CommonSchemaLog (com.microsoft.appcenter.ingestion.models.one.CommonSchemaLog)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1