diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt index 153148ef7..e63b75d16 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt @@ -18,7 +18,6 @@ import androidx.test.platform.app.InstrumentationRegistry import com.snowplowanalytics.core.tracker.Logger.updateLogLevel import com.snowplowanalytics.core.tracker.Subject import com.snowplowanalytics.snowplow.Snowplow.createTracker -import com.snowplowanalytics.snowplow.network.HttpMethod import com.snowplowanalytics.snowplow.util.Size import org.junit.Assert import org.junit.Test @@ -131,6 +130,14 @@ class SubjectTest { Assert.assertNull(subject.getSubject(true)["ip"]) } + @Test + fun testSetsScreenResolutionAutomaticaly() { + val subject = createSubject() + Assert.assertNotNull(subject.screenResolution) + Assert.assertTrue((subject.screenResolution?.width ?: 0) > 0) + Assert.assertTrue((subject.screenResolution?.height ?: 0) > 0) + } + // Helper Methods private fun createSubject(): Subject { updateLogLevel(LogLevel.DEBUG)