Java 类com.facebook.react.common.annotations.VisibleForTesting 实例源码

项目:RNLearn_Project1    文件:CatalystInstanceImpl.java   
/**
 * Initialize all the native modules
 */
@VisibleForTesting
@Override
public void initialize() {
  UiThreadUtil.assertOnUiThread();
  Assertions.assertCondition(
      !mInitialized,
      "This catalyst instance has already been initialized");
  // We assume that the instance manager blocks on running the JS bundle. If
  // that changes, then we need to set mAcceptCalls just after posting the
  // task that will run the js bundle.
  Assertions.assertCondition(
      mAcceptCalls,
      "RunJSBundle hasn't completed.");
  mInitialized = true;
  mNativeModulesQueueThread.runOnQueue(new Runnable() {
    @Override
    public void run() {
      mJavaRegistry.notifyJSInstanceInitialized();
    }
  });
}
项目:RNLearn_Project1    文件:CatalystInstanceImpl.java   
/**
 * Initialize all the native modules
 */
@VisibleForTesting
@Override
public void initialize() {
  UiThreadUtil.assertOnUiThread();
  Assertions.assertCondition(
      !mInitialized,
      "This catalyst instance has already been initialized");
  // We assume that the instance manager blocks on running the JS bundle. If
  // that changes, then we need to set mAcceptCalls just after posting the
  // task that will run the js bundle.
  Assertions.assertCondition(
      mAcceptCalls,
      "RunJSBundle hasn't completed.");
  mInitialized = true;
  mNativeModulesQueueThread.runOnQueue(new Runnable() {
    @Override
    public void run() {
      mJavaRegistry.notifyJSInstanceInitialized();
    }
  });
}
项目:Ironman    文件:CatalystInstanceImpl.java   
/**
 * Initialize all the native modules
 */
@VisibleForTesting
@Override
public void initialize() {
  UiThreadUtil.assertOnUiThread();
  Assertions.assertCondition(
      !mInitialized,
      "This catalyst instance has already been initialized");
  // We assume that the instance manager blocks on running the JS bundle. If
  // that changes, then we need to set mAcceptCalls just after posting the
  // task that will run the js bundle.
  Assertions.assertCondition(
      mAcceptCalls,
      "RunJSBundle hasn't completed.");
  mInitialized = true;
  mJavaRegistry.notifyCatalystInstanceInitialized();
}
项目:RNLearn_Project1    文件:ReactViewGroup.java   
@VisibleForTesting
public int getBackgroundColor() {
  if (getBackground() != null) {
    return ((ReactViewBackgroundDrawable) getBackground()).getColor();
  }
  return DEFAULT_BACKGROUND_COLOR;
}
项目:RNLearn_Project1    文件:ReactViewGroup.java   
@VisibleForTesting
public int getBackgroundColor() {
  if (getBackground() != null) {
    return ((ReactViewBackgroundDrawable) getBackground()).getColor();
  }
  return DEFAULT_BACKGROUND_COLOR;
}
项目:ReactNativeSignatureExample    文件:ReactViewGroup.java   
@VisibleForTesting
public int getBackgroundColor() {
  if (getBackground() != null) {
    return ((ReactViewBackgroundDrawable) getBackground()).getColor();
  }
  return DEFAULT_BACKGROUND_COLOR;
}
项目:ReactNativeSignatureExample    文件:CatalystInstanceImpl.java   
/**
 * Initialize all the native modules
 */
@VisibleForTesting
@Override
public void initialize() {
  UiThreadUtil.assertOnUiThread();
  Assertions.assertCondition(
      !mInitialized,
      "This catalyst instance has already been initialized");
  mInitialized = true;
  mJavaRegistry.notifyCatalystInstanceInitialized();
}
项目:ReactNativeSignatureExample    文件:ReactRootView.java   
/**
 * Is used by unit test to setup mWasMeasured and mIsAttachedToWindow flags, that will let this
 * view to be properly attached to catalyst instance by startReactApplication call
 */
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
  mIsAttachedToWindow = true;
  mIsAttachedToInstance = true;
  mWasMeasured = true;
}
项目:react-native-ibeacon-android    文件:ReactViewGroup.java   
@VisibleForTesting
public int getBackgroundColor() {
  if (getBackground() != null) {
    return ((ReactViewBackgroundDrawable) getBackground()).getColor();
  }
  return DEFAULT_BACKGROUND_COLOR;
}
项目:react-native-ibeacon-android    文件:CatalystInstanceImpl.java   
/**
 * Initialize all the native modules
 */
@VisibleForTesting
@Override
public void initialize() {
  UiThreadUtil.assertOnUiThread();
  Assertions.assertCondition(
      !mInitialized,
      "This catalyst instance has already been initialized");
  mInitialized = true;
  mJavaRegistry.notifyCatalystInstanceInitialized();
}
项目:react-native-ibeacon-android    文件:ReactRootView.java   
/**
 * Is used by unit test to setup mWasMeasured and mIsAttachedToWindow flags, that will let this
 * view to be properly attached to catalyst instance by startReactApplication call
 */
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
  mIsAttachedToWindow = true;
  mIsAttachedToInstance = true;
  mWasMeasured = true;
}
项目:react-native-box-loaders    文件:ReactViewGroup.java   
@VisibleForTesting
public int getBackgroundColor() {
  if (getBackground() != null) {
    return ((ReactViewBackgroundDrawable) getBackground()).getColor();
  }
  return DEFAULT_BACKGROUND_COLOR;
}
项目:react-native-box-loaders    文件:CatalystInstanceImpl.java   
/**
 * Initialize all the native modules
 */
@VisibleForTesting
@Override
public void initialize() {
  UiThreadUtil.assertOnUiThread();
  Assertions.assertCondition(
      !mInitialized,
      "This catalyst instance has already been initialized");
  mInitialized = true;
  mJavaRegistry.notifyCatalystInstanceInitialized();
}
项目:react-native-box-loaders    文件:ReactRootView.java   
/**
 * Is used by unit test to setup mWasMeasured and mIsAttachedToWindow flags, that will let this
 * view to be properly attached to catalyst instance by startReactApplication call
 */
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
  mIsAttachedToWindow = true;
  mIsAttachedToInstance = true;
  mWasMeasured = true;
}
项目:Ironman    文件:ReactViewGroup.java   
@VisibleForTesting
public int getBackgroundColor() {
  if (getBackground() != null) {
    return ((ReactViewBackgroundDrawable) getBackground()).getColor();
  }
  return DEFAULT_BACKGROUND_COLOR;
}
项目:RNLearn_Project1    文件:ReactViewBackgroundDrawable.java   
@VisibleForTesting
public int getColor() {
  return mColor;
}
项目:RNLearn_Project1    文件:ReactPicker.java   
@VisibleForTesting
public int getMode() {
  return mMode;
}
项目:RNLearn_Project1    文件:ReactModalHostView.java   
@VisibleForTesting
public @Nullable Dialog getDialog() {
  return mDialog;
}
项目:RNLearn_Project1    文件:CatalystInstance.java   
@VisibleForTesting
void setGlobalVariable(String propName, String jsonValue);
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
@VisibleForTesting
public @Nullable ReactContext getCurrentReactContext() {
  return mCurrentReactContext;
}
项目:RNLearn_Project1    文件:ReactRootView.java   
/**
 * Is used by unit test to setup mWasMeasured and mIsAttachedToWindow flags, that will let this
 * view to be properly attached to catalyst instance by startReactApplication call
 */
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
  mIsAttachedToInstance = true;
  mWasMeasured = true;
}
项目:RNLearn_Project1    文件:ReactViewBackgroundDrawable.java   
@VisibleForTesting
public int getColor() {
  return mColor;
}
项目:RNLearn_Project1    文件:ReactPicker.java   
@VisibleForTesting
public int getMode() {
  return mMode;
}
项目:RNLearn_Project1    文件:ReactModalHostView.java   
@VisibleForTesting
public @Nullable Dialog getDialog() {
  return mDialog;
}
项目:RNLearn_Project1    文件:CatalystInstance.java   
@VisibleForTesting
void setGlobalVariable(String propName, String jsonValue);
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
@VisibleForTesting
public @Nullable ReactContext getCurrentReactContext() {
  return mCurrentReactContext;
}
项目:RNLearn_Project1    文件:ReactRootView.java   
/**
 * Is used by unit test to setup mWasMeasured and mIsAttachedToWindow flags, that will let this
 * view to be properly attached to catalyst instance by startReactApplication call
 */
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
  mIsAttachedToInstance = true;
  mWasMeasured = true;
}
项目:ReactNativeSignatureExample    文件:ReactViewBackgroundDrawable.java   
@VisibleForTesting
public int getColor() {
  return mColor;
}
项目:ReactNativeSignatureExample    文件:ReactPicker.java   
@VisibleForTesting
public int getMode() {
  return mMode;
}
项目:ReactNativeSignatureExample    文件:CatalystInstanceImpl.java   
@VisibleForTesting
@Override
public void setGlobalVariable(String propName, String jsonValue) {
  mBridge.setGlobalVariable(propName, jsonValue);
}
项目:ReactNativeSignatureExample    文件:CatalystInstance.java   
@VisibleForTesting
void setGlobalVariable(String propName, String jsonValue);
项目:ReactNativeSignatureExample    文件:ReactInstanceManagerImpl.java   
@VisibleForTesting
@Override
public @Nullable ReactContext getCurrentReactContext() {
  return mCurrentReactContext;
}
项目:ReactNativeSignatureExample    文件:ReactInstanceManager.java   
@VisibleForTesting
public abstract @Nullable ReactContext getCurrentReactContext();
项目:react-native-ibeacon-android    文件:ReactViewBackgroundDrawable.java   
@VisibleForTesting
public int getColor() {
  return mColor;
}
项目:react-native-ibeacon-android    文件:ReactPicker.java   
@VisibleForTesting
public int getMode() {
  return mMode;
}
项目:react-native-ibeacon-android    文件:CatalystInstanceImpl.java   
@VisibleForTesting
@Override
public void setGlobalVariable(String propName, String jsonValue) {
  mBridge.setGlobalVariable(propName, jsonValue);
}
项目:react-native-ibeacon-android    文件:CatalystInstance.java   
@VisibleForTesting
void setGlobalVariable(String propName, String jsonValue);
项目:react-native-ibeacon-android    文件:ReactInstanceManagerImpl.java   
@VisibleForTesting
@Override
public @Nullable ReactContext getCurrentReactContext() {
  return mCurrentReactContext;
}
项目:react-native-ibeacon-android    文件:ReactInstanceManager.java   
@VisibleForTesting
public abstract @Nullable ReactContext getCurrentReactContext();
项目:react-native-box-loaders    文件:ReactViewBackgroundDrawable.java   
@VisibleForTesting
public int getColor() {
  return mColor;
}