Code example for TextView

Methods: appendgetTextsetText

0
    assertNotNull(textView.getPaint());
  } 
 
  @Test 
  public void testNoArgAppend() { 
    textView.setText("a");
    textView.append("b");
    assertThat(textView.getText().toString()).isEqualTo("ab");
  } 
 
  @Test 
  public void setTextSize_shouldHandleDips() throws Exception { 
    shadowOf(Robolectric.application.getResources()).setDensity(1.5f); 
    textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 10);
    assertThat(textView.getTextSize()).isEqualTo(15f);
    textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 20);
    assertThat(textView.getTextSize()).isEqualTo(30f);
  } 
 
  @Test 
  public void setTextSize_shouldHandlePixels() throws Exception {