Search in sources :

Example 46 with Device

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

the class PartAUtilsTest method getDevice.

@NonNull
private Device getDevice(int appCenterTimeZoneOffset) {
    /* Create App Center models, starting with the device object. */
    Device device = new Device();
    device.setModel("model");
    device.setOemName("oemName");
    device.setLocale("en_US");
    device.setOsName("osName");
    device.setOsVersion("8.1.0");
    device.setOsBuild("ABC.123");
    device.setOsApiLevel(23);
    device.setAppVersion("1.0.0");
    device.setAppNamespace("com.appcenter.test");
    device.setCarrierName("carrierName");
    device.setSdkName("appcenter.android");
    device.setSdkVersion("1.5.0");
    device.setTimeZoneOffset(appCenterTimeZoneOffset);
    return device;
}
Also used : Device(com.microsoft.appcenter.ingestion.models.Device) NonNull(androidx.annotation.NonNull)

Aggregations

Device (com.microsoft.appcenter.ingestion.models.Device)46 Test (org.junit.Test)32 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)29 Context (android.content.Context)18 File (java.io.File)15 Date (java.util.Date)11 ManagedErrorLog (com.microsoft.appcenter.crashes.ingestion.models.ManagedErrorLog)10 Matchers.anyString (org.mockito.Matchers.anyString)10 TestCrashException (com.microsoft.appcenter.crashes.model.TestCrashException)9 IOException (java.io.IOException)9 ErrorReport (com.microsoft.appcenter.crashes.model.ErrorReport)8 Log (com.microsoft.appcenter.ingestion.models.Log)8 JSONException (org.json.JSONException)8 PackageInfo (android.content.pm.PackageInfo)7 PackageManager (android.content.pm.PackageManager)7 Build (android.os.Build)7 InvocationOnMock (org.mockito.invocation.InvocationOnMock)7 TelephonyManager (android.telephony.TelephonyManager)6 Log.getStackTraceString (android.util.Log.getStackTraceString)6 DefaultLogSerializer (com.microsoft.appcenter.ingestion.models.json.DefaultLogSerializer)6