<commit_before>package com.elpassion.android.commons.espresso

import android.app.Instrumentation
import android.content.Intent
import android.os.Bundle
import android.support.test.InstrumentationRegistry
import android.support.test.rule.ActivityTestRule
import android.widget.TextView
import org.junit.Assert.assertNull
import org.junit.Rule
import org.junit.Test

class ActivityTestRuleUtilsTest {

    @JvmField @Rule
    val activityRule = ActivityTestRule(Activity::class.java, false, false)

    @Test
    fun shouldNotStartActivity() {
        assertNull(activityRule.activity)
    }

    @Test
    fun shouldStartActivity() {
        activityRule.startActivity()
        onText("text").doesNotExist()
    }

    @Test
    fun shouldStartActivityWithIntent() {
        activityRule.startActivity(Intent().apply { putExtra("TEXT_KEY", "text") })
        onText("text").isDisplayed()<commit_msg>#74 Remove unused imports<commit_after>package com.elpassion.android.commons.espresso

import android.content.Intent
import android.os.Bundle
import android.support.test.rule.ActivityTestRule
import android.widget.TextView
import org.junit.Assert.assertNull
import org.junit.Rule
import org.junit.Test

class ActivityTestRuleUtilsTest {

    @JvmField @Rule
    val activityRule = ActivityTestRule(Activity::class.java, false, false)

    @Test
    fun shouldNotStartActivity() {
        assertNull(activityRule.activity)
    }

    @Test
    fun shouldStartActivity() {
        activityRule.startActivity()
        onText("text").doesNotExist()
    }

    @Test
    fun shouldStartActivityWithIntent() {
        activityRule.startActivity(Intent().apply { putExtra("TEXT_KEY", "text") })
        onText("text").isDisplayed()
{'fraction_non_alphanumeric': 0.10086956521739131, 'fraction_numerical': 0.0011594202898550724, 'mean_word_length': 4.091445427728614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '145564', 'n_tokens_mistral': 489, 'n_tokens_neox': 479, 'n_words': 88}