WXSDKEngine { public static boolean registerDomObject(String type, Class<? extends WXDomObject> clazz) throws WXException { return WXDomRegistry.registerDomObject(type, clazz); }  @Deprecated static void init(Application application); @Deprecated static void init(Application application, IWXUserTrackAdapter utAdapter); @Deprecated static void init(Application application, IWXUserTrackAdapter utAdapter, String framework); static boolean isInitialized(); static void initialize(Application application,InitConfig config); @Deprecated static void init(Application application, String framework, IWXUserTrackAdapter utAdapter, IWXImgLoaderAdapter imgLoaderAdapter, IWXHttpAdapter httpAdapter); static boolean registerComponent(String type, Class<? extends WXComponent> clazz, boolean appendTree); static boolean registerComponent(String type, IExternalComponentGetter componentGetter, boolean appendTree); static boolean registerComponent(Class<? extends WXComponent> clazz, boolean appendTree,String ... names); static boolean registerModule(String moduleName, Class<T> moduleClass,boolean global); static boolean registerModuleWithFactory(String moduleName, DestroyableModuleFactory factory, boolean global); static boolean registerModule(String moduleName, Class<? extends WXModule> moduleClass); static boolean registerDomObject(String type, Class<? extends WXDomObject> clazz); static void callback(String instanceId, String funcId, Map<String, Object> data); static void restartBridge(boolean debug); static boolean registerComponent(String type, Class<? extends WXComponent> clazz); static boolean registerComponent(Map<String, String> componentInfo, Class<? extends WXComponent> clazz); static void addCustomOptions(String key, String value); static IWXUserTrackAdapter getIWXUserTrackAdapter(); @Deprecated static void setIWXUserTrackAdapter(IWXUserTrackAdapter IWXUserTrackAdapter); static IWXImgLoaderAdapter getIWXImgLoaderAdapter(); @Deprecated static void setIWXImgLoaderAdapter(IWXImgLoaderAdapter IWXImgLoaderAdapter); static IWXHttpAdapter getIWXHttpAdapter(); @Deprecated static void setIWXHttpAdapter(IWXHttpAdapter IWXHttpAdapter); static IWXStorageAdapter getIWXStorageAdapter(); static IActivityNavBarSetter getActivityNavBarSetter(); static void setActivityNavBarSetter(IActivityNavBarSetter activityNavBarSetter); static void show3DLayer(boolean show); static void switchDebugModel(boolean debug, String debugUrl); static void reload(final Context context, boolean remoteDebug); static void reload(); static final String JS_FRAMEWORK_RELOAD; }
@Test public void testRegisterDomObject() throws Exception { assertFalse(WXSDKEngine.registerDomObject("test",null)); assertFalse(WXSDKEngine.registerDomObject("", TestDomObject.class)); assertTrue(WXSDKEngine.registerDomObject("test",TestDomObject.class)); }