public UIManagerModule getUIManagerModule() { ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest(); List<ViewManager> viewManagers = Arrays.asList( new ViewManager[] { new ReactTextInputManager(), }); DisplayMetrics displayMetrics = reactContext.getResources().getDisplayMetrics(); DisplayMetricsHolder.setWindowDisplayMetrics(displayMetrics); DisplayMetricsHolder.setScreenDisplayMetrics(displayMetrics); UIManagerModule uiManagerModule = new UIManagerModule( reactContext, viewManagers, new UIImplementation(reactContext, viewManagers)); uiManagerModule.onHostResume(); return uiManagerModule; }
public UIManagerModule getUIManagerModule() { ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest(); DisplayMetrics displayMetrics = reactContext.getResources().getDisplayMetrics(); DisplayMetricsHolder.setWindowDisplayMetrics(displayMetrics); DisplayMetricsHolder.setScreenDisplayMetrics(displayMetrics); List<ViewManager> viewManagers = Arrays.asList( new ViewManager[] { new ReactTextViewManager(), new ReactRawTextManager(), }); UIManagerModule uiManagerModule = new UIManagerModule( reactContext, viewManagers, new UIImplementation(reactContext, viewManagers)); uiManagerModule.onHostResume(); return uiManagerModule; }
public UIManagerModule getUIManagerModule() { ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest(); List<ViewManager> viewManagers = Arrays.asList( new ViewManager[] { new ReactTextInputManager(), }); UIManagerModule uiManagerModule = new UIManagerModule( reactContext, viewManagers, new UIImplementationProvider(), false); uiManagerModule.onHostResume(); return uiManagerModule; }
@Before public void setup() { mContext = new ReactApplicationContext(RuntimeEnvironment.application); mCatalystInstanceMock = ReactTestHelper.createMockCatalystInstance(); mContext.initializeWithInstance(mCatalystInstanceMock); mThemedContext = new ThemedReactContext(mContext, mContext); mManager = new ReactTextInputManager(); DisplayMetricsHolder.setWindowDisplayMetrics(new DisplayMetrics()); }
@Before public void setup() { ReactApplicationContext mContext = new ReactApplicationContext(RuntimeEnvironment.application); CatalystInstance mCatalystInstanceMock = ReactTestHelper.createMockCatalystInstance(); mContext.initializeWithInstance(mCatalystInstanceMock); mThemedContext = new ThemedReactContext(mContext, mContext); mManager = new ReactSliderManager(); }
public UIManagerModule getUIManagerModule() { ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest(); List<ViewManager> viewManagers = Arrays.asList( new ViewManager[] { new ReactTextViewManager(), new ReactRawTextManager(), }); UIManagerModule uiManagerModule = new UIManagerModule( reactContext, viewManagers, new UIImplementationProvider(), false); uiManagerModule.onHostResume(); return uiManagerModule; }
@Before public void setup() { mContext = new ReactApplicationContext(RuntimeEnvironment.application); mCatalystInstanceMock = ReactTestHelper.createMockCatalystInstance(); mContext.initializeWithInstance(mCatalystInstanceMock); mThemeContext = new ThemedReactContext(mContext, mContext); Fresco.initialize(mContext); DisplayMetricsHolder.setWindowDisplayMetrics(new DisplayMetrics()); }
@Before public void prepareModules() throws Exception { PowerMockito.mockStatic(Arguments.class); Mockito.when(Arguments.createMap()).thenAnswer(new Answer<Object>() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { return new JavaOnlyMap(); } }); mShareModule = new ShareModule(ReactTestHelper.createCatalystContextForTest()); }
@Before public void setup() { mContext = new ReactApplicationContext(RuntimeEnvironment.application); mCatalystInstanceMock = ReactTestHelper.createMockCatalystInstance(); mContext.initializeWithInstance(mCatalystInstanceMock); mThemedContext = new ThemedReactContext(mContext, mContext); mManager = new ConcreteViewManager(); }
public UIManagerModule getUIManagerModule() { ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest(); List<ViewManager> viewManagers = Arrays.asList( new ViewManager[] { new ReactTextInputManager(), }); UIManagerModule uiManagerModule = new UIManagerModule( reactContext, viewManagers, new UIImplementationProvider()); uiManagerModule.onHostResume(); return uiManagerModule; }
public UIManagerModule getUIManagerModule() { ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest(); List<ViewManager> viewManagers = Arrays.asList( new ViewManager[] { new ReactTextViewManager(), new ReactRawTextManager(), }); UIManagerModule uiManagerModule = new UIManagerModule( reactContext, viewManagers, new UIImplementationProvider()); uiManagerModule.onHostResume(); return uiManagerModule; }
@Before public void setUp() { mClipboardModule = new ClipboardModule(ReactTestHelper.createCatalystContextForTest()); mClipboardManager = (ClipboardManager) RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE); }