package org.umlg.sqlg.test;

import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.umlg.sqlg.AnyTest;

import java.io.File;
import java.io.IOException;

/**
 * @author Lukas Krejci
 * @since 1.3.0
 */
public class H2AnyTest extends AnyTest {

    @BeforeClass
    public static void setUp() {
        try {
            FileUtils.cleanDirectory(new File("./src/test/db/"));
        } catch (IOException e) {
            Assert.fail("Failed to delete H2's db dir at ./src/test/db");
        }
    }
}

@@ -372,28 +372,18 @@
 File
-Utils.cleanD
+ d
 irectory
 (new
@@ -378,17 +378,19 @@
 irectory
-(
+ = 
 new File
@@ -407,18 +407,178 @@
 st/db/%22)
-)
 ;
+%0A            if (directory.exists()) %7B%0A                FileUtils.cleanDirectory(directory);%0A            %7D else %7B%0A                directory.mkdir();%0A            %7D
 %0A       

create H2's db directory if it does not exists