mardi 31 mai 2016

Robolectric unit tests build.os version returns incorrectly?

Hi i am trying to run a unit test that executes a code block if the build version is 23 or more but when i call the Build.VERSION.SDK_INT it always returns 1?

here is the unit test code:

@Config(emulateSdk = 18)
public class Test {

   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
         //test some block of code

   }

}

Aucun commentaire:

Enregistrer un commentaire