From 39f2507bfcb25a5556f5ac8f621a609c5eb304ce Mon Sep 17 00:00:00 2001 From: Patrick Bassut Date: Sun, 4 Jun 2017 02:22:13 -0300 Subject: [PATCH] ReadableMap/ReadableArray getDynamic should be implemented --- .../src/test/java/com/facebook/react/bridge/SimpleArray.java | 5 +++++ .../src/test/java/com/facebook/react/bridge/SimpleMap.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/android/src/test/java/com/facebook/react/bridge/SimpleArray.java b/android/src/test/java/com/facebook/react/bridge/SimpleArray.java index 15656bd..b1b649d 100644 --- a/android/src/test/java/com/facebook/react/bridge/SimpleArray.java +++ b/android/src/test/java/com/facebook/react/bridge/SimpleArray.java @@ -125,6 +125,11 @@ public String toString() { return mBackingList.toString(); } + @Override + public Dynamic getDynamic(int index) { + return DynamicFromArray.create(this, index); + } + @Override public boolean equals(Object o) { if (this == o) return true; diff --git a/android/src/test/java/com/facebook/react/bridge/SimpleMap.java b/android/src/test/java/com/facebook/react/bridge/SimpleMap.java index 39f3d33..d039ba7 100644 --- a/android/src/test/java/com/facebook/react/bridge/SimpleMap.java +++ b/android/src/test/java/com/facebook/react/bridge/SimpleMap.java @@ -101,6 +101,11 @@ public ReadableType getType(String name) { throw new UnsupportedOperationException("Method not implemented"); } + @Override + public Dynamic getDynamic(String name) { + return DynamicFromMap.create(this, name); + } + @Override public ReadableMapKeySetIterator keySetIterator() { return new ReadableMapKeySetIterator() {