How Can use Espresso 2 (for tests) with extends Application (android.app.Application)?

I have gradle android-project. My project work, and my espresso-tests work too.

But If I adding my implementation android.app.Application (extends Application and <application android:name=".AppInstance" ... in AndroidManifest) - throw - tests not found, when I start their, by connectedAndroidTest.

How Can I use android.app.Application (extends Application) with library Espresso 2?

I found goode example with espresso 2 and extends Application (http://engineering.circle.com/instrumentation-testing-with-dagger-mockito-and-espresso/), but tests in this example do not work :(

Answers


It helped me - https://github.com/bryanstern/dagger-instrumentation-example/issues/1

I must to add some code to build.gradle:

debugCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
debugCompile 'com.google.dexmaker:dexmaker:1.0'
debugCompile 'org.mockito:mockito-core:1.10.17'

debugCompile ('com.android.support.test.espresso:espresso-core:2.0') {
    exclude group: 'javax.inject'
}
debugCompile 'com.android.support.test:testing-support-lib:0.1'

Need Your Help

Issue with Linked List (Java applet)

java applet

In this code, I am trying to initialize a linked list of ovals that are sent to a class to be drawn.

Linkedin OAuth callback not being called in PHP?

php oauth linkedin access-token

Just like this question with no answer, I am trying to hook up to Linked in through PHP/OAuth. I have gotten the token. Gotten everything working. But for some reason Linkedin will not return to my

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.