@@ -0,0 +1,1380 @@
+package suadb.test;%0A%0Aimport org.junit.AfterClass;%0Aimport org.junit.BeforeClass;%0A%0Aimport java.io.File;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Created by Rony on 2016-11-16.%0A */%0Apublic class SuaDBTestBase%0A%7B%0A%09protected static String dbName = %22testDB%22;%0A%09protected static String arrayFileName = %22testArray.arr%22;%0A%09%0A%09protected static String homeDir;%0A%09protected static File dbDirectory;%0A%09%0A%09@BeforeClass%0A%09final public static void SuaDBTestBaseSetup()%0A%09%7B%0A%09%09homeDir = System.getProperty(%22user.home%22);%0A%09%09dbDirectory = new File(homeDir, dbName);%0A%09%7D%0A%09%0A%09@AfterClass%0A%09final public static void SuaDBTestBaseTearDown()%0A%09%7B%0A%09%09if(dbDirectory.exists())%0A%09%09%7B%0A%09%09%09eraseAllTestFile(dbDirectory);%0A%09%09%7D%0A%09%7D%0A%09%0A%09static protected void eraseAllTestFile(File file)%0A%09%7B%0A%09%09assertTrue(file.exists() == deleteDirectory(file));%0A%09%09assertFalse(file.exists());%0A%09%7D%0A%09%0A%09static protected boolean deleteDirectory(File path)%0A%09%7B%0A%09%09if(!path.exists())%0A%09%09%7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%09%0A%09%09File%5B%5D files = path.listFiles();%0A%09%09for(File file : files)%0A%09%09%7B%0A%09%09%09if(file.isDirectory())%0A%09%09%09%7B%0A%09%09%09%09deleteDirectory(file);%0A%09%09%09%7D else%0A%09%09%09%7B%0A%09%09%09%09boolean b1 = file.exists();%0A%09%09%09%09boolean b2 = file.delete();%0A%09%09%09%09%0A%09%09%09%09System.out.println(b1);%0A%09%09%09%09System.out.println(b2);%0A%09%09%09%09%0A%09%09%09%09assertTrue(%0A%09%09%09%09%09%09%22Delete %22 + file.getPath(),%0A%09%09%09%09%09%09file.exists() == file.delete());%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return path.delete();%0A%09%7D%0A%7D%0A

Make SuaDB Test Base class