mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-10 17:55:57 +01:00
Fix tests for windows build
This commit is contained in:
@@ -85,10 +85,6 @@ public class InputConfig implements CommandLine.IVersionProvider {
|
||||
System.setProperty("DEFAULT_MKV_TOOL_NIX", SystemUtils.IS_OS_WINDOWS ? "C:\\Program Files\\MKVToolNix" : "/usr/bin/");
|
||||
}
|
||||
|
||||
public String getNormalizedLibraryPath() {
|
||||
return this.getLibraryPath().getAbsolutePath().replace("\\", "/");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringJoiner(", ", InputConfig.class.getSimpleName() + "[", "]")
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package at.pcgamingfreaks.mkvaudiosubtitlechanger.util;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class SetUtils {
|
||||
public static <T> Set<T> retainOf(List<T> list1, List<T> list2) {
|
||||
Set<T> set = new HashSet<>(list1);
|
||||
set.retainAll(list2);
|
||||
return set;
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,8 @@ class ValidationExecutionStrategyTest {
|
||||
.setExecutionStrategy(new ValidationExecutionStrategy())
|
||||
.parseArgs("-a", "ger:ger", "-l", TEST_FILE, "-m", TEST_MKVTOOLNIX_DIR);
|
||||
|
||||
assertEquals(TEST_FILE, underTest.getConfig().getLibraryPath().getPath());
|
||||
assertEquals(TEST_MKVTOOLNIX_DIR, underTest.getConfig().getMkvToolNix().getPath());
|
||||
assertEquals(TEST_FILE, underTest.getConfig().getLibraryPath().getPath().replace("\\", "/"));
|
||||
assertEquals(TEST_MKVTOOLNIX_DIR, underTest.getConfig().getMkvToolNix().getPath().replace("\\", "/"));
|
||||
}
|
||||
|
||||
private static Stream<Arguments> validateFailure() {
|
||||
@@ -56,6 +56,6 @@ class ValidationExecutionStrategyTest {
|
||||
.execute(args);
|
||||
|
||||
printWriter.flush();
|
||||
assertEquals(expectedMessage, writer.toString().split("\n")[0]);
|
||||
assertEquals(expectedMessage, writer.toString().split("[\r\n]")[0]);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package at.pcgamingfreaks.mkvaudiosubtitlechanger.util;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class SetUtilsTest {
|
||||
|
||||
@Test
|
||||
void retainOf() {
|
||||
List<Integer> list1 = List.of(1, 2, 3, 4, 5);
|
||||
List<Integer> list2 = List.of(2, 4, 6, 8, 10);
|
||||
Set<Integer> expected = Set.of(2, 4);
|
||||
|
||||
assertEquals(expected, SetUtils.retainOf(list1, list2));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user