Code example for ComponentName

Methods: flattenToString

1
 
  public IntentAssert hasComponent(ComponentName expected) {
    ComponentName componentName = actual.getComponent();
    assertThat(componentName)
        .overridingErrorMessage("Expected component name <%s> but was <%s>.", 
            expected.flattenToString(), componentName.flattenToString())
        .isEqualTo(expected);
    return this;
  } 
 
  public IntentAssert hasComponent(Context context, Class<?> cls) {
    return hasComponent(new ComponentName(context, cls.getName()));
  } 
 
  public IntentAssert hasComponent(String appPkg, Class<?> cls) {
    return hasComponent(new ComponentName(appPkg, cls.getName()));
  } 
 
  public static String flagsToString(int flags) {
    return new BitMaskStringBuilder(flags) //