mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +01:00
Fix attribute config test
This commit is contained in:
@@ -27,10 +27,10 @@ class AttributeConfigTest {
|
|||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideTestCases")
|
@MethodSource("provideTestCases")
|
||||||
void validate(String[] cmdArgs, List<AttributeConfig> expectedConfig) {
|
void validate(String[] cmdArgs, AttributeConfig[] expectedConfig) {
|
||||||
Main underTest = new Main();
|
Main underTest = new Main();
|
||||||
CommandLine.populateCommand(underTest, cmdArgs);
|
CommandLine.populateCommand(underTest, cmdArgs);
|
||||||
assertIterableEquals(expectedConfig, underTest.getConfig().getAttributeConfig());
|
assertArrayEquals(expectedConfig, underTest.getConfig().getAttributeConfig());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -51,10 +51,10 @@ class AttributeConfigTest {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<AttributeConfig> attrConf(String... languages) {
|
private static AttributeConfig[] attrConf(String... languages) {
|
||||||
List<AttributeConfig> conf = new ArrayList<>();
|
AttributeConfig[] conf = new AttributeConfig[languages.length/2];
|
||||||
for (int i = 0; i < languages.length; i += 2) {
|
for (int i = 0; i < languages.length; i += 2) {
|
||||||
conf.add(new AttributeConfig(languages[i], languages[i+1]));
|
conf[i / 2] = new AttributeConfig(languages[i], languages[i+1]);
|
||||||
}
|
}
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class InputConfigTest {
|
|||||||
InputConfig config = CommandLine.populateCommand(new InputConfig(), sut);
|
InputConfig config = CommandLine.populateCommand(new InputConfig(), sut);
|
||||||
|
|
||||||
assertTrue(config.getLibraryPath().exists());
|
assertTrue(config.getLibraryPath().exists());
|
||||||
assertEquals(List.of(new AttributeConfig("ger", "ger"), new AttributeConfig("eng", "eng")),
|
assertArrayEquals(new AttributeConfig[]{new AttributeConfig("ger", "ger"), new AttributeConfig("eng", "eng")},
|
||||||
config.getAttributeConfig());
|
config.getAttributeConfig());
|
||||||
|
|
||||||
assertTrue(config.isSafeMode());
|
assertTrue(config.isSafeMode());
|
||||||
|
|||||||
Reference in New Issue
Block a user