test_class.declarator: mActivityController
test_class.modifier: private
test_class.original_string: private ActivityController<Activity> mActivityController;
test_class.type: ActivityController<Activity>
test_class.var_name: mActivityController
test_class.declarator: mActivity
test_class.modifier: private
test_class.original_string: private Activity mActivity;
test_class.type: Activity
test_class.var_name: mActivity
test_class.declarator: mDialogModule
test_class.modifier: private
test_class.original_string: private DialogModule mDialogModule;
test_class.type: DialogModule
test_class.var_name: mDialogModule
test_class.file: node_modules/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/dialog/DialogModuleTest.java
test_class.identifier: DialogModuleTest
test_case.body: @Test
    public void testCallbackPositive() {
      final JavaOnlyMap options = new JavaOnlyMap();
      options.putString("buttonPositive", "OK");
  
      final SimpleCallback actionCallback = new SimpleCallback();
      mDialogModule.showAlert(options, null, actionCallback);
  
      final AlertDialog dialog = (AlertDialog) getFragment().getDialog();
      dialog.getButton(DialogInterface.BUTTON_POSITIVE).performClick();
  
      assertEquals(1, actionCallback.getCalls());
      assertEquals(DialogModule.ACTION_BUTTON_CLICKED, actionCallback.getArgs()[0]);
      assertEquals(DialogInterface.BUTTON_POSITIVE, actionCallback.getArgs()[1]);
    }
test_case.class_method_signature: DialogModuleTest.testCallbackPositive()
test_case.full_signature: @Test public void testCallbackPositive()
test_case.identifier: testCallbackPositive
test_case.invocations: putString showAlert getDialog getFragment performClick getButton assertEquals getCalls assertEquals getArgs assertEquals getArgs
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCallbackPositive()
focal_class.declarator: FRAGMENT_TAG =
        "com.facebook.catalyst.react.dialog.DialogModule"
focal_class.modifier: static final
focal_class.original_string: static final String FRAGMENT_TAG =
        "com.facebook.catalyst.react.dialog.DialogModule";
focal_class.type: String
focal_class.var_name: FRAGMENT_TAG
focal_class.declarator: NAME = "DialogManagerAndroid"
focal_class.modifier: static final
focal_class.original_string: static final String NAME = "DialogManagerAndroid";
focal_class.type: String
focal_class.var_name: NAME
focal_class.declarator: ACTION_BUTTON_CLICKED = "buttonClicked"
focal_class.modifier: static final
focal_class.original_string: static final String ACTION_BUTTON_CLICKED = "buttonClicked";
focal_class.type: String
focal_class.var_name: ACTION_BUTTON_CLICKED
focal_class.declarator: ACTION_DISMISSED = "dismissed"
focal_class.modifier: static final
focal_class.original_string: static final String ACTION_DISMISSED = "dismissed";
focal_class.type: String
focal_class.var_name: ACTION_DISMISSED
focal_class.declarator: KEY_TITLE = "title"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_TITLE = "title";
focal_class.type: String
focal_class.var_name: KEY_TITLE
focal_class.declarator: KEY_MESSAGE = "message"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_MESSAGE = "message";
focal_class.type: String
focal_class.var_name: KEY_MESSAGE
focal_class.declarator: KEY_BUTTON_POSITIVE = "buttonPositive"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_BUTTON_POSITIVE = "buttonPositive";
focal_class.type: String
focal_class.var_name: KEY_BUTTON_POSITIVE
focal_class.declarator: KEY_BUTTON_NEGATIVE = "buttonNegative"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_BUTTON_NEGATIVE = "buttonNegative";
focal_class.type: String
focal_class.var_name: KEY_BUTTON_NEGATIVE
focal_class.declarator: KEY_BUTTON_NEUTRAL = "buttonNeutral"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_BUTTON_NEUTRAL = "buttonNeutral";
focal_class.type: String
focal_class.var_name: KEY_BUTTON_NEUTRAL
focal_class.declarator: KEY_ITEMS = "items"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_ITEMS = "items";
focal_class.type: String
focal_class.var_name: KEY_ITEMS
focal_class.declarator: CONSTANTS = MapBuilder.<String, Object>of(
        ACTION_BUTTON_CLICKED, ACTION_BUTTON_CLICKED,
        ACTION_DISMISSED, ACTION_DISMISSED,
        KEY_BUTTON_POSITIVE, DialogInterface.BUTTON_POSITIVE,
        KEY_BUTTON_NEGATIVE, DialogInterface.BUTTON_NEGATIVE,
        KEY_BUTTON_NEUTRAL, DialogInterface.BUTTON_NEUTRAL)
focal_class.modifier: static final
focal_class.original_string: static final Map<String, Object> CONSTANTS = MapBuilder.<String, Object>of(
        ACTION_BUTTON_CLICKED, ACTION_BUTTON_CLICKED,
        ACTION_DISMISSED, ACTION_DISMISSED,
        KEY_BUTTON_POSITIVE, DialogInterface.BUTTON_POSITIVE,
        KEY_BUTTON_NEGATIVE, DialogInterface.BUTTON_NEGATIVE,
        KEY_BUTTON_NEUTRAL, DialogInterface.BUTTON_NEUTRAL);
focal_class.type: Map<String, Object>
focal_class.var_name: CONSTANTS
focal_class.declarator: mIsInForeground
focal_class.modifier: private
focal_class.original_string: private boolean mIsInForeground;
focal_class.type: boolean
focal_class.var_name: mIsInForeground
focal_class.file: node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java
focal_class.identifier: DialogModule
focal_class.interfaces: implements LifecycleEventListener
focal_class.class_method_signature: DialogModule.DialogModule(ReactApplicationContext reactContext)
focal_class.full_signature: public  DialogModule(ReactApplicationContext reactContext)
focal_class.identifier: DialogModule
focal_class.modifiers: public
focal_class.parameters: (ReactApplicationContext reactContext)
focal_class.signature:  DialogModule(ReactApplicationContext reactContext)
focal_class.class_method_signature: DialogModule.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: DialogModule.getConstants()
focal_class.full_signature: @Override public Map<String, Object> getConstants()
focal_class.identifier: getConstants
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getConstants()
focal_class.class_method_signature: DialogModule.initialize()
focal_class.full_signature: @Override public void initialize()
focal_class.identifier: initialize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initialize()
focal_class.class_method_signature: DialogModule.onHostPause()
focal_class.full_signature: @Override public void onHostPause()
focal_class.identifier: onHostPause
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onHostPause()
focal_class.class_method_signature: DialogModule.onHostDestroy()
focal_class.full_signature: @Override public void onHostDestroy()
focal_class.identifier: onHostDestroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onHostDestroy()
focal_class.class_method_signature: DialogModule.onHostResume()
focal_class.full_signature: @Override public void onHostResume()
focal_class.identifier: onHostResume
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onHostResume()
focal_class.class_method_signature: DialogModule.showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_class.full_signature: @ReactMethod public void showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_class.identifier: showAlert
focal_class.modifiers: @ReactMethod public
focal_class.parameters: (
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_class.return: void
focal_class.signature: void showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_class.class_method_signature: DialogModule.getFragmentManagerHelper()
focal_class.full_signature: private @Nullable FragmentManagerHelper getFragmentManagerHelper()
focal_class.identifier: getFragmentManagerHelper
focal_class.modifiers: private @Nullable
focal_class.parameters: ()
focal_class.return: FragmentManagerHelper
focal_class.signature: FragmentManagerHelper getFragmentManagerHelper()
focal_class.superclass: extends ReactContextBaseJavaModule
focal_method.body: @ReactMethod
    public void showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback) {
      FragmentManagerHelper fragmentManagerHelper = getFragmentManagerHelper();
      if (fragmentManagerHelper == null) {
        errorCallback.invoke("Tried to show an alert while not attached to an Activity");
        return;
      }
  
      final Bundle args = new Bundle();
      if (options.hasKey(KEY_TITLE)) {
        args.putString(AlertFragment.ARG_TITLE, options.getString(KEY_TITLE));
      }
      if (options.hasKey(KEY_MESSAGE)) {
        args.putString(AlertFragment.ARG_MESSAGE, options.getString(KEY_MESSAGE));
      }
      if (options.hasKey(KEY_BUTTON_POSITIVE)) {
        args.putString(AlertFragment.ARG_BUTTON_POSITIVE, options.getString(KEY_BUTTON_POSITIVE));
      }
      if (options.hasKey(KEY_BUTTON_NEGATIVE)) {
        args.putString(AlertFragment.ARG_BUTTON_NEGATIVE, options.getString(KEY_BUTTON_NEGATIVE));
      }
      if (options.hasKey(KEY_BUTTON_NEUTRAL)) {
        args.putString(AlertFragment.ARG_BUTTON_NEUTRAL, options.getString(KEY_BUTTON_NEUTRAL));
      }
      if (options.hasKey(KEY_ITEMS)) {
        ReadableArray items = options.getArray(KEY_ITEMS);
        CharSequence[] itemsArray = new CharSequence[items.size()];
        for (int i = 0; i < items.size(); i ++) {
          itemsArray[i] = items.getString(i);
        }
        args.putCharSequenceArray(AlertFragment.ARG_ITEMS, itemsArray);
      }
  
      fragmentManagerHelper.showNewAlert(mIsInForeground, args, actionCallback);
    }
focal_method.class_method_signature: DialogModule.showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_method.full_signature: @ReactMethod public void showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_method.identifier: showAlert
focal_method.invocations: getFragmentManagerHelper invoke hasKey putString getString hasKey putString getString hasKey putString getString hasKey putString getString hasKey putString getString hasKey getArray size size getString putCharSequenceArray showNewAlert
focal_method.modifiers: @ReactMethod public
focal_method.parameters: (
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)
focal_method.return: void
focal_method.signature: void showAlert(
        ReadableMap options,
        Callback errorCallback,
        Callback actionCallback)