[IMPL] read path to mkvtoolnix

This commit is contained in:
RatzzFatzz
2019-11-22 11:59:02 +01:00
parent 5aeddfa968
commit 25e9fd6f3f
7 changed files with 114 additions and 5 deletions

View File

@@ -0,0 +1,3 @@
public class MainTest {
}

View File

@@ -0,0 +1,31 @@
package config;
import lombok.extern.log4j.Log4j2;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
@Log4j2
public class MKVToolPropertiesTest {
@Test
public void testPathIsValid() {
try(PrintWriter out = new PrintWriter("mkvDirectoryPath", "UTF-8")){
out.print("test/resources");
}catch(FileNotFoundException | UnsupportedEncodingException e){
log.error("File not found!");
}
try(PrintWriter out = new PrintWriter("mkvDirectoryPath", "UTF-8")){
out.print("test/resources/");
}catch(FileNotFoundException | UnsupportedEncodingException e){
log.error("File not found!");
}finally{
File file = new File("mkvDirectoryPath");
file.delete();
}
}
}

View File

View File