Remove guava dependency (#309)
Summary: It's only used in `JavascriptSessionTest`, and seems fine to keep it in tests Resolves #172 Pull Request resolved: https://github.com/facebook/flipper/pull/309 Reviewed By: passy Differential Revision: D12840362 Pulled By: jknoxville fbshipit-source-id: 4ead5a4bf0c08d792abcadef713f907930a3e4e7
This commit is contained in:
committed by
Facebook Github Bot
parent
f3833a6e5a
commit
62b913d844
@@ -45,7 +45,6 @@ android {
|
|||||||
compileOnly deps.lithoAnnotations
|
compileOnly deps.lithoAnnotations
|
||||||
implementation project(':fbjni')
|
implementation project(':fbjni')
|
||||||
implementation deps.soloader
|
implementation deps.soloader
|
||||||
implementation deps.guava
|
|
||||||
implementation deps.jsr305
|
implementation deps.jsr305
|
||||||
implementation deps.supportAppCompat
|
implementation deps.supportAppCompat
|
||||||
implementation deps.stetho
|
implementation deps.stetho
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ package com.facebook.flipper.plugins.console;
|
|||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@@ -42,12 +42,10 @@ public class JavascriptSessionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVariablesGetBoundCorrectly() throws Exception {
|
public void testVariablesGetBoundCorrectly() throws Exception {
|
||||||
JavascriptSession session =
|
Map<String, Object> data = new HashMap<>();
|
||||||
new JavascriptSession(
|
data.put("a", 2);
|
||||||
mContextFactory,
|
data.put("b", 2);
|
||||||
ImmutableMap.<String, Object>of(
|
JavascriptSession session = new JavascriptSession(mContextFactory, data);
|
||||||
"a", 2,
|
|
||||||
"b", 2));
|
|
||||||
JSONObject json = session.evaluateCommand("a+b");
|
JSONObject json = session.evaluateCommand("a+b");
|
||||||
assertEquals("json", json.getString("type"));
|
assertEquals("json", json.getString("type"));
|
||||||
assertEquals(4, json.getInt("value"));
|
assertEquals(4, json.getInt("value"));
|
||||||
@@ -65,10 +63,9 @@ public class JavascriptSessionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testJavaObjectEvaluation() throws Exception {
|
public void testJavaObjectEvaluation() throws Exception {
|
||||||
JavascriptSession session =
|
Map<String, Object> data = new HashMap<>();
|
||||||
new JavascriptSession(
|
data.put("object", new HashMap<String, String>());
|
||||||
mContextFactory,
|
JavascriptSession session = new JavascriptSession(mContextFactory, data);
|
||||||
ImmutableMap.<String, Object>of("object", new HashMap<String, String>()));
|
|
||||||
JSONObject json = session.evaluateCommand("object");
|
JSONObject json = session.evaluateCommand("object");
|
||||||
assertEquals("javaObject", json.getString("type"));
|
assertEquals("javaObject", json.getString("type"));
|
||||||
assertEquals("{}", json.getJSONObject("value").getString("toString"));
|
assertEquals("{}", json.getJSONObject("value").getString("toString"));
|
||||||
@@ -76,10 +73,9 @@ public class JavascriptSessionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testJavaMethodEvaluation() throws Exception {
|
public void testJavaMethodEvaluation() throws Exception {
|
||||||
JavascriptSession session =
|
Map<String, Object> data = new HashMap<>();
|
||||||
new JavascriptSession(
|
data.put("object", new HashMap<String, String>());
|
||||||
mContextFactory,
|
JavascriptSession session = new JavascriptSession(mContextFactory, data);
|
||||||
ImmutableMap.<String, Object>of("object", new HashMap<String, String>()));
|
|
||||||
JSONObject json = session.evaluateCommand("object.get");
|
JSONObject json = session.evaluateCommand("object.get");
|
||||||
assertEquals("method", json.getString("type"));
|
assertEquals("method", json.getString("type"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user