pass EventDispatcher to UIImplementation constructor

Summary: This way `UIImplementation` can hold on to it and use it outside of calls from the `UIManagerModule`.

Reviewed By: lexs

Differential Revision: D3899774

fbshipit-source-id: 01e4956c4540bcdf30774a3f40a625e934714ee9
This commit is contained in:
Felix Oghina
2016-10-04 12:29:13 -07:00
committed by Facebook Github Bot
parent 5eb28dc4f0
commit f7cbd56d8e
15 changed files with 82 additions and 65 deletions
@@ -25,10 +25,10 @@ import com.facebook.react.uimanager.annotations.ReactPropGroup;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.rule.PowerMockRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.fest.assertions.api.Assertions.fail;
@@ -148,7 +148,7 @@ public class ReactPropConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
reactContext,
viewManagers,
new UIImplementation(reactContext, viewManagers));
new UIImplementationProvider());
Map<String, String> constants =
(Map) valueAtPath(uiManagerModule.getConstants(), "SomeView", "NativeProps");
assertThat(constants).isEqualTo(