Code example for ColorStateList

0
  } 
 
  @Implements(TextView.class)
  public static class TextViewWithDummyGetTextColorsMethod { 
    public static ColorStateList getTextColors(Context context, TypedArray attrs) {
      return new ColorStateList(new int[0][0], new int[0]);
    } 
  } 
 
  @Test 
  @Config(shadows = ShadowOfClassWithSomeConstructors.class) 
  public void shouldGenerateSeparatedConstructorBodies() throws Exception { 
    ClassWithSomeConstructors o = new ClassWithSomeConstructors("my name");
    assertNull(o.name);
 
    Method realConstructor = o.getClass().getDeclaredMethod(InstrumentingClassLoader.CONSTRUCTOR_METHOD_NAME, String.class);
    realConstructor.setAccessible(true);
    realConstructor.invoke(o, "my name");
    assertEquals("my name", o.name);
  }