Code example for Context

Methods: getFilesDir

0
    assertTrue(cacheTest.exists());
  } 
 
  @Test 
  public void getFilesDir_shouldCreateDirectory() throws Exception { 
    assertTrue(context.getFilesDir().exists());
  } 
 
  @Test 
  public void fileList() throws Exception { 
    assertThat(context.fileList()).isEqualTo(context.getFilesDir().list());
  } 
 
  @Test 
  public void getExternalFilesDir_shouldCreateDirectory() throws Exception { 
    assertTrue(context.getExternalFilesDir(null).exists());
  } 
 
  @Test 
  public void getExternalFilesDir_shouldCreateNamedDirectory() throws Exception { 
    File f = context.getExternalFilesDir("__test__");