Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblock-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java

Issue 29819555: Fix libadblockplus-android tests
Patch Set: Fixed indentation issues. Created Aug. 27, 2018, 8:03 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: adblock-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java
diff --git a/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java b/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java
index 4023a79a091959c578d7173c6f01a3dcccc9879b..9415f955f1f23c57a9ad6fe79f3c55bea6990025 100644
--- a/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java
+++ b/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/AppInfoJsObjectTest.java
@@ -18,8 +18,8 @@
package org.adblockplus.libadblockplus.tests;
import org.adblockplus.libadblockplus.AppInfo;
-import org.adblockplus.libadblockplus.JsEngine;
+import org.adblockplus.libadblockplus.BasePlatformTest;
import org.junit.Test;
public class AppInfoJsObjectTest extends BasePlatformTest
@@ -27,7 +27,7 @@ public class AppInfoJsObjectTest extends BasePlatformTest
@Test
public void testAllProperties()
{
- AppInfo appInfo = AppInfo
+ setAppInfo(AppInfo
.builder()
.setVersion("1")
.setName("3")
@@ -35,10 +35,9 @@ public class AppInfoJsObjectTest extends BasePlatformTest
.setApplicationVersion("5")
.setLocale("2")
.setDevelopmentBuild(true)
- .build();
+ .build());
- platform.setUpJsEngine(appInfo);
- JsEngine jsEngine = platform.getJsEngine();
+ setupJsEngine();
assertEquals("1", jsEngine.evaluate("_appInfo.version").asString());
assertEquals("3", jsEngine.evaluate("_appInfo.name").asString());
assertEquals("4", jsEngine.evaluate("_appInfo.application").asString());
@@ -50,11 +49,10 @@ public class AppInfoJsObjectTest extends BasePlatformTest
@Test
public void testDefaultPropertyValues()
{
- AppInfo appInfo = AppInfo
+ setAppInfo(AppInfo
.builder()
- .build();
- platform.setUpJsEngine(appInfo);
- JsEngine jsEngine = platform.getJsEngine();
+ .build());
+ setupJsEngine();
assertEquals("1.0", jsEngine.evaluate("_appInfo.version").asString());
assertEquals("libadblockplus-android", jsEngine.evaluate("_appInfo.name").asString());
assertEquals("android", jsEngine.evaluate("_appInfo.application").asString());

Powered by Google App Engine
This is Rietveld