From 697e457da453568ca703c2b655a2dd490157b443 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 25 Dec 2018 16:32:51 -0500 Subject: Clean up image activity and prepare for tests --- .../frost/activities/ImageActivityTest.kt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt (limited to 'app/src/androidTest/kotlin/com/pitchedapps') diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt new file mode 100644 index 00000000..abffb106 --- /dev/null +++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/activities/ImageActivityTest.kt @@ -0,0 +1,32 @@ +package com.pitchedapps.frost.activities + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.rule.ActivityTestRule +import org.junit.Rule +import org.junit.runner.RunWith +import android.content.Intent +import com.pitchedapps.frost.utils.ARG_COOKIE +import com.pitchedapps.frost.utils.ARG_IMAGE_URL +import com.pitchedapps.frost.utils.ARG_TEXT +import org.junit.Test + +@RunWith(AndroidJUnit4::class) +class ImageActivityTest { + + @get:Rule + val activity: ActivityTestRule = ActivityTestRule(ImageActivity::class.java, true, false) + + private fun launchActivity(imageUrl: String, text: String? = null, cookie: String? = null) { + val intent = Intent().apply { + putExtra(ARG_IMAGE_URL, imageUrl) + putExtra(ARG_TEXT, text) + putExtra(ARG_COOKIE, cookie) + } + activity.launchActivity(intent) + } + + @Test + fun intent() { + + } +} \ No newline at end of file -- cgit v1.2.3