File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
tests/objectbox-java-test/src/test/java/io/objectbox Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1616
1717package io .objectbox ;
1818
19+ import io .objectbox .exception .DbException ;
1920import org .junit .Test ;
2021
2122import java .io .File ;
22- import java .util .Locale ;
2323import java .util .concurrent .Callable ;
2424
25- import javax .annotation .Nullable ;
26-
27- import io .objectbox .exception .DbException ;
28-
29- import static org .junit .Assert .*;
25+ import static org .junit .Assert .assertEquals ;
26+ import static org .junit .Assert .assertFalse ;
27+ import static org .junit .Assert .assertNotNull ;
28+ import static org .junit .Assert .assertNotSame ;
29+ import static org .junit .Assert .assertSame ;
30+ import static org .junit .Assert .assertTrue ;
31+ import static org .junit .Assert .fail ;
3032
3133public class BoxStoreTest extends AbstractObjectBoxTest {
3234
@@ -126,7 +128,11 @@ public void testDeleteAllFiles_baseDirName() {
126128 closeStoreForTest ();
127129 File basedir = new File ("test-base-dir" );
128130 String name = "mydb" ;
129- basedir .mkdir ();
131+ if (!basedir .exists ()) {
132+ if (!basedir .mkdir ()) {
133+ fail ("Failed to create test directory." );
134+ }
135+ }
130136 assertTrue (basedir .isDirectory ());
131137 File dbDir = new File (basedir , name );
132138 assertFalse (dbDir .exists ());
You can’t perform that action at this time.
0 commit comments