@RunWith(AndroidJUnit4::class)
@LargeTest
class MainActivityTest {
val password = "1234"
@Rule @JvmField
var mActivityRule: ActivityTestRule<MainActivity> = ActivityTestRule(MainActivity::class.java)
@Test
fun checkNotesListNotEmpty() {
onView(withId(R.id.password_edit_text)).perform(typeText(password))
onView(withId(R.id.notes_recycler_view)).check { view, noMatchingViewException ->
if (noMatchingViewException != null) throw noMatchingViewException
assertThat((view as RecyclerView).adapter.itemCount, Matchers.`is`(1))
}
}
}
我将变量存储在这里:
实际上,我将数据存储在来自database.now的变量(string user_id)中。现在我想将此变量用于另一种形式。当我从第一个表单中获取变量时,我得到一个空值。