Skip to content
Snippets Groups Projects
Commit b39bc629 authored by Guillaume Blanc's avatar Guillaume Blanc
Browse files

Add output directory creation

parent 359839e4
No related branches found
No related tags found
1 merge request!485Avatar security tests
...@@ -2,11 +2,16 @@ package ui; ...@@ -2,11 +2,16 @@ package ui;
import common.ConfigurationTTool; import common.ConfigurationTTool;
import common.SpecConfigTTool; import common.SpecConfigTTool;
import myutil.FileException;
import myutil.FileUtils; import myutil.FileUtils;
import myutil.TraceManager; import myutil.TraceManager;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*; import java.util.*;
import static org.junit.Assert.*; import static org.junit.Assert.*;
...@@ -41,7 +46,17 @@ public class AvatarSecurityTests extends AbstractUITest { ...@@ -41,7 +46,17 @@ public class AvatarSecurityTests extends AbstractUITest {
RESOURCES_DIR = baseResourcesDir + RES_FOLDER; RESOURCES_DIR = baseResourcesDir + RES_FOLDER;
INPUT_DIR = RESOURCES_DIR + INPUT_FOLDER; INPUT_DIR = RESOURCES_DIR + INPUT_FOLDER;
OUTPUT_DIR = RESOURCES_DIR + OUTPUT_FOLDER; OUTPUT_DIR = RESOURCES_DIR + OUTPUT_FOLDER;
FileUtils.deleteFiles(OUTPUT_DIR);
File outputDir = new File(OUTPUT_DIR);
if (outputDir.exists()) {
FileUtils.deleteFiles(OUTPUT_DIR);
} else {
boolean result = outputDir.mkdir();
if (!result) {
throw new FileException("Can't create output directory");
}
}
initModels(); initModels();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment