Search in sources :

Example 1 with AbstractLog

use of com.microsoft.azure.mobile.ingestion.models.AbstractLog in project mobile-center-sdk-android by Microsoft.

the class LogContainerTest method compareLogContainer.

@Test
public void compareLogContainer() {
    LogContainer container1 = new LogContainer();
    LogContainer container2 = new LogContainer();
    TestUtils.compareSelfNullClass(container1);
    TestUtils.checkEquals(container1, container2);
    Log log1 = new AbstractLog() {

        @Override
        public String getType() {
            return "null";
        }
    };
    log1.setSid(UUID.randomUUID());
    container1.setLogs(Collections.singletonList(log1));
    TestUtils.compareSelfNullClass(container1);
    TestUtils.checkNotEquals(container1, container2);
    container2.setLogs(Collections.singletonList(log1));
    TestUtils.compareSelfNullClass(container1);
    TestUtils.checkEquals(container1, container2);
    Log log2 = new AbstractLog() {

        @Override
        public String getType() {
            return null;
        }
    };
    log2.setSid(UUID.randomUUID());
    container2.setLogs(Collections.singletonList(log2));
    TestUtils.compareSelfNullClass(container1);
    TestUtils.checkNotEquals(container1, container2);
}
Also used : Log(com.microsoft.azure.mobile.ingestion.models.Log) AbstractLog(com.microsoft.azure.mobile.ingestion.models.AbstractLog) AbstractLog(com.microsoft.azure.mobile.ingestion.models.AbstractLog) LogContainer(com.microsoft.azure.mobile.ingestion.models.LogContainer) Test(org.junit.Test)

Aggregations

AbstractLog (com.microsoft.azure.mobile.ingestion.models.AbstractLog)1 Log (com.microsoft.azure.mobile.ingestion.models.Log)1 LogContainer (com.microsoft.azure.mobile.ingestion.models.LogContainer)1 Test (org.junit.Test)1