Code example for File

Methods: getParent

0
    public RobolectricConfig(final File baseDir) {
        this(new File(baseDir, "AndroidManifest.xml"), new File(baseDir, "res"), new File(baseDir, "assets"));
    } 
 
    public RobolectricConfig(final File androidManifestFile, final File resourceDirectory) {
        this(androidManifestFile, resourceDirectory, new File(resourceDirectory.getParent(), "assets"));
    } 
 
    /** 
     * Creates a Robolectric configuration using specified locations. 
     * 
     * @param androidManifestFile location of the AndroidManifest.xml file 
     * @param resourceDirectory   location of the res directory 
     * @param assetsDirectory     location of the assets directory 
     */ 
    public RobolectricConfig(final File androidManifestFile, final File resourceDirectory, final File assetsDirectory) {
        this.androidManifestFile = androidManifestFile;
        this.resourceDirectory = resourceDirectory;
        this.assetsDirectory = assetsDirectory;
    }