From 0a02b131393d1138479387563e18ac5ad2a8b20d Mon Sep 17 00:00:00 2001 From: Jahir Fiquitiva Date: Sat, 10 Nov 2018 10:38:35 -0500 Subject: [PATCH] Update tests and sample --- .../javiersantos/piracychecker/PiracyCheckerTest.java | 8 ++++---- .../javiersantos/piracychecker/UnauthorizedAppTest.java | 2 +- .../piracychecker/UnauthorizedAppUninstalledTest.java | 4 ++-- .../javiersantos/piracychecker/demo/KotlinActivity.kt | 2 +- .../javiersantos/piracychecker/demo/MainActivity.java | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/androidTest/java/com/github/javiersantos/piracychecker/PiracyCheckerTest.java b/app/src/androidTest/java/com/github/javiersantos/piracychecker/PiracyCheckerTest.java index e6f8c6c..922a0de 100644 --- a/app/src/androidTest/java/com/github/javiersantos/piracychecker/PiracyCheckerTest.java +++ b/app/src/androidTest/java/com/github/javiersantos/piracychecker/PiracyCheckerTest.java @@ -143,7 +143,7 @@ public void verifyUnauthorizedApps_ALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableUnauthorizedAppsCheck(true) + .enableUnauthorizedAppsCheck() .callback(new PiracyCheckerCallback() { @Override public void allow() { @@ -172,7 +172,7 @@ public void verifyThirdPartyStores_ALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableUnauthorizedAppsCheck(true) + .enableUnauthorizedAppsCheck() .callback(new PiracyCheckerCallback() { @Override public void allow() { @@ -201,7 +201,7 @@ public void verifyDeepPirate_ALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableFoldersCheck(true) + .enableFoldersCheck() .callback(new PiracyCheckerCallback() { @Override public void allow() { @@ -230,7 +230,7 @@ public void verifyDebug_DONTALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableDebugCheck(true) + .enableDebugCheck() .callback(new PiracyCheckerCallback() { @Override public void allow() { diff --git a/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppTest.java b/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppTest.java index 329e495..237a974 100644 --- a/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppTest.java +++ b/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppTest.java @@ -106,7 +106,7 @@ public void verifyUnauthorizedApps_DONTALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableUnauthorizedAppsCheck(true) + .enableUnauthorizedAppsCheck() .blockIfUnauthorizedAppUninstalled("piracychecker_preferences", "app_unauthorized") .callback(new PiracyCheckerCallback() { diff --git a/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppUninstalledTest.java b/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppUninstalledTest.java index 2d8e621..6b712c0 100644 --- a/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppUninstalledTest.java +++ b/app/src/androidTest/java/com/github/javiersantos/piracychecker/UnauthorizedAppUninstalledTest.java @@ -37,7 +37,7 @@ public void verifyBlockUnauthorizedApps_DONTALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableUnauthorizedAppsCheck(true) + .enableUnauthorizedAppsCheck() .blockIfUnauthorizedAppUninstalled("piracychecker_preferences", "app_unauthorized") .callback(new PiracyCheckerCallback() { @@ -75,7 +75,7 @@ public void verifyUnauthorizedApps_ALLOW() throws Throwable { @Override public void run() { new PiracyChecker(InstrumentationRegistry.getTargetContext()) - .enableUnauthorizedAppsCheck(true) + .enableUnauthorizedAppsCheck() .callback(new PiracyCheckerCallback() { @Override public void allow() { diff --git a/app/src/main/java/com/github/javiersantos/piracychecker/demo/KotlinActivity.kt b/app/src/main/java/com/github/javiersantos/piracychecker/demo/KotlinActivity.kt index be6751f..3e94657 100644 --- a/app/src/main/java/com/github/javiersantos/piracychecker/demo/KotlinActivity.kt +++ b/app/src/main/java/com/github/javiersantos/piracychecker/demo/KotlinActivity.kt @@ -115,7 +115,7 @@ class KotlinActivity : AppCompatActivity() { fun verifyEmulator() { piracyChecker { display(piracyCheckerDisplay) - enableEmulatorCheck() + enableEmulatorCheck(false) }.start() } } \ No newline at end of file diff --git a/app/src/main/java/com/github/javiersantos/piracychecker/demo/MainActivity.java b/app/src/main/java/com/github/javiersantos/piracychecker/demo/MainActivity.java index 4c6d4e2..f8cdddd 100644 --- a/app/src/main/java/com/github/javiersantos/piracychecker/demo/MainActivity.java +++ b/app/src/main/java/com/github/javiersantos/piracychecker/demo/MainActivity.java @@ -78,7 +78,7 @@ public void verifyInstallerId(View view) { public void verifyUnauthorizedApps(View view) { new PiracyChecker(this) .display(piracyCheckerDisplay) - .enableUnauthorizedAppsCheck(true) + .enableUnauthorizedAppsCheck() //.blockIfUnauthorizedAppUninstalled("license_checker", "block") .start(); } @@ -86,21 +86,21 @@ public void verifyUnauthorizedApps(View view) { public void verifyStores(View view) { new PiracyChecker(this) .display(piracyCheckerDisplay) - .enableStoresCheck(true) + .enableStoresCheck() .start(); } public void verifyDebug(View view) { new PiracyChecker(this) .display(piracyCheckerDisplay) - .enableDebugCheck(true) + .enableDebugCheck() .start(); } public void verifyEmulator(View view) { new PiracyChecker(this) .display(piracyCheckerDisplay) - .enableEmulatorCheck(true) + .enableEmulatorCheck(false) .start(); } } \ No newline at end of file