use of com.facebook.react.bridge.Arguments in project react-native-navigation by wix.
the class ColorParseTest method shouldParsePlatformColors.
@Test
public void shouldParsePlatformColors() throws JSONException {
JSONObject color = new JSONObject();
final JSONArray jsonArray = new JSONArray();
jsonArray.put("@color/colorPrimary");
color.put("resource_paths", jsonArray);
try (MockedStatic<Arguments> theMock = Mockito.mockStatic(Arguments.class)) {
theMock.when(Arguments::createMap).thenReturn(new JavaOnlyMap());
theMock.when(Arguments::createArray).thenReturn(new JavaOnlyArray());
assertThat(ColorParser.parse(activity, color, "color")).isInstanceOf(ReactPlatformColor.class);
}
}
Aggregations