Remove attribute config as required option

This commit is contained in:
RatzzFatzz
2025-12-18 21:17:51 +01:00
parent 5f2248653b
commit 3e74e23512
6 changed files with 30 additions and 33 deletions

View File

@@ -65,9 +65,10 @@ class CoherentAttributeUpdaterTest {
@MethodSource("findMatch")
void findMatch(AttributeConfig attributeConfig, List<Pair<File, FileInfo>> fileInfoMock, boolean expectedMatch, int expectedMatchCount) throws InvocationTargetException, IllegalAccessException {
CommandRunner commandRunner = new CommandRunner();
new CommandLine(commandRunner).parseArgs("-l", "/arst", "-a", "ger:ger");
new CommandLine(commandRunner).parseArgs("-a", "ger:ger", "/arst");
InputConfig config = commandRunner.getConfig();
CoherentAttributeUpdater updater = new CoherentAttributeUpdater(config, fileProcessor, null);
AttributeChangeProcessor attributeChangeProcessor = new AttributeChangeProcessor(config.getPreferredSubtitles().toArray(new String[0]), config.getForcedKeywords(), config.getCommentaryKeywords(), config.getHearingImpaired());
CoherentAttributeUpdater updater = new CoherentAttributeUpdater(config, fileProcessor, attributeChangeProcessor);
Set<FileInfo> matchedFiles = new HashSet<>(fileInfoMock.size() * 2);
List<File> files = new ArrayList<>();