mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 10:05:58 +01:00
[IMPL] read path to mkvtoolnix
This commit is contained in:
31
src/test/java/config/MKVToolPropertiesTest.java
Normal file
31
src/test/java/config/MKVToolPropertiesTest.java
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user