android - Mocking Google Analytics v4 -
Depending on what I am trying to test my code.
Especially I am trying to joke with com.google.android.gms.analytics.Tracker
Tracker Tracker = Mockito.mock (Tracker.class) ;. yields
Is there any remedy? The only thing I can think of is to prepare my own cover.
After
I believe the cloning of the code is Tracker. Class is - because it will instantiate the class, which in turn throws VerifyError . This is not a problem with your code, but there is a limit to the Google Play services that has been reported and
The following is the solution provided by SuperJugy in the second link, to the bottom of my Gradle File Creation. By putting used to:.
: tasks.withType (test) {} {// test JVM test JVM (j) jvmArgs Setting debate for '-UseSplitVerifier -XX'} I had to add VM option -noverify to my test build configuration to work in Android studio.
I think that you can work in the problem of using the cover, so long the cover code tracker does not institute the class though it is not easy ( Or is it possible?), Please tell me if you have to go through this path and succeed!
Comments
Post a Comment