I am in Android Studio, trying to do a Unit Test. I follow the instructions in Vogella tutorial, all ok, except when I import and refer to a class subject of the test. For example, a test like this works:
assertTrue("test", true);
but not this:
assertTrue("test", myMethod.returnTrue());
where the myMethod is in a class that I have imported (with a classic import like:)
import com.example.Example.myMethod;
my build.gradle contains:
dependencies {
...
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
}
how to resolve?
Aucun commentaire:
Enregistrer un commentaire