WXNavigatorModule extends WXModule { @WXModuleAnno public void setNavBarTitle(String param, final String callbackId) { if (!TextUtils.isEmpty(param)) { if (WXSDKEngine.getActivityNavBarSetter() != null) { if (WXSDKEngine.getActivityNavBarSetter().setNavBarTitle(param)) { WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId, MSG_SUCCESS); return; } } } WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId, MSG_FAILED); }  @WXModuleAnno void push(String param, final String callbackId); @WXModuleAnno void pop(String param, final String callbackId); @WXModuleAnno void setNavBarRightItem(String param, final String callbackId); @WXModuleAnno void clearNavBarRightItem(String param, final String callbackId); @WXModuleAnno void setNavBarLeftItem(String param, final String callbackId); @WXModuleAnno void clearNavBarLeftItem(String param, final String callbackId); @WXModuleAnno void setNavBarMoreItem(String param, final String callbackId); @WXModuleAnno void clearNavBarMoreItem(String param, final String callbackId); @WXModuleAnno void setNavBarTitle(String param, final String callbackId); static final String MSG_SUCCESS; static final String MSG_FAILED; }
@Test public void testSetNavBarTitle() throws Exception { mockSetter(); module.setNavBarTitle("{}",""); }