Home
Exams
Providers
About
Sign In
Sign Up
Home
/
Exams
/
Google Associate Android Developer
/
Question #7
#7
Multiple Choice
Mark for review
The following code snippet shows an example of an Espresso test:
A.
@Rule fun greeterSaysHello() { onView(withId(R.id.name_field)).do(typeText("Steve")) onView(withId(R.id.greet_button)).do(click()) onView(withText("Hello Steve!")).check(matches(isDisplayed())) }
B.
@Test fun greeterSaysHello() { onView(withId(R.id.name_field)).perform(typeText("Steve")) onView(withId(R.id.greet_button)).perform(click()) onView(withText("Hello Steve!")).check(matches(isDisplayed())) }
C.
@Test fun greeterSaysHello() { onView(withId(R.id.name_field)).do(typeText("Steve")) onView(withId(R.id.greet_button)).do(click()) onView(withText("Hello Steve!")).compare(matches(isDisplayed())) }
Reveal Answer
Previous
Question 7 of 107
Exam ASSOCIATE-ANDROID-DEVELOPER Topic 1 Question 7
Back to all questions
Next
Sign In
Sign Up