Search in sources :

Example 6 with LocalCarbonFile

use of org.apache.carbondata.core.datastore.filesystem.LocalCarbonFile in project carbondata by apache.

the class CarbonUtilTest method testToDeleteFoldersAndFilesForCarbonFileSilently.

@Test
public void testToDeleteFoldersAndFilesForCarbonFileSilently() throws IOException, InterruptedException {
    LocalCarbonFile testDir = new LocalCarbonFile("../core/src/test/resources/testDir");
    testDir.createNewFile();
    CarbonUtil.deleteFoldersAndFilesSilent(testDir);
    assertTrue(!testDir.exists());
}
Also used : LocalCarbonFile(org.apache.carbondata.core.datastore.filesystem.LocalCarbonFile) Test(org.junit.Test)

Example 7 with LocalCarbonFile

use of org.apache.carbondata.core.datastore.filesystem.LocalCarbonFile in project carbondata by apache.

the class CarbonUtilTest method testToDeleteFoldersAndFilesForValidCarbonFile.

@Test
public void testToDeleteFoldersAndFilesForValidCarbonFile() throws InterruptedException, IOException {
    LocalCarbonFile testDir = new LocalCarbonFile("../core/src/test/resources/testDir/testCarbonFile");
    testDir.createNewFile();
    CarbonUtil.deleteFoldersAndFiles(testDir);
    assertTrue(!testDir.exists());
}
Also used : LocalCarbonFile(org.apache.carbondata.core.datastore.filesystem.LocalCarbonFile) Test(org.junit.Test)

Aggregations

LocalCarbonFile (org.apache.carbondata.core.datastore.filesystem.LocalCarbonFile)7 Test (org.junit.Test)7 MockUp (mockit.MockUp)4 IOException (java.io.IOException)2 File (java.io.File)1