Google Associate Android Developer Associate-Android-Developer Exam Practice Test

Page: 1 / 14
Total 128 questions
Question 1

The following code snippet shows an example of an Espresso test:



Answer : B


Question 2

To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:



Answer : B


Question 3

@Query is the main annotation used in DAO classes. It allows you to perform read/write operations on a database. Each @Query method is verified at compile time, so what happens if there is a problem with the query?



Answer : B


Question 4

The Log class allows you to create log messages that appear in logcat. Generally, you could use the following log methods: (Choose five.)



Answer : A, C, D, F, G


Question 5

In our TeaViewModel class, that extends ViewModel, we have such method:

public LiveData getTea() { return mTea;

}

An observer in our Activity (type of mViewModel variable in example is TeaViewModel) is set in this way:

mViewModel.getTea().observe(this, this::displayTea);

What will be a correct displayTea method definition?



Answer : B


Question 6

The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Medium tests are integration tests that:



Answer : B


Question 7

What do you want from Room when you create a DAO method and annotate it with @Delete?

Example:

@Dao

interface MyDao {

@Delete

fun deleteUsers(vararg users: User)

}



Answer : C


Page:    1 / 14   
Total 128 questions