'What dependencies and other lines should be added into build.gradle(:app) and gradle>build.gradle to work with Tests?

I've been doing Kotlin Basics Unit 2 (Test Lists and Adapters), I followed instructions and used proper dependencies. But with Test classes, code completion or any code suggestion features do not work. I'm able to import only after typing the code. Screenshot. Now after several ALT+ENTER I have no idea how to import check(). Unresolved reference: check

I have decided to add these in settings.gradle after going across official docs (and yet I face same issues)

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        jcenter()
        google()
        mavenCentral()
    }
}
  1. Is there a way to include the whole espresso module so I don't have to worry?
  2. What official documents should be reffered to know more about cause of the issue? (I tried to lookup, either the method didn't work or I'm overloaded with information)
  3. Am I missing some core files need by Android Studio to work with Tests?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source