Skip to content
Snippets Groups Projects
Commit 700810f0 authored by Andrey Ruzhanskiy's avatar Andrey Ruzhanskiy
Browse files

Removed unused Code and test.

parent 9fb3951c
No related branches found
No related tags found
1 merge request!14Feat/braille print back end 4
......@@ -14,6 +14,4 @@ task integrationTest(type: Test) {
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
checkstyleIntegrationTest.enabled = false
}
check.dependsOn integrationTest
\ No newline at end of file
}
\ No newline at end of file
......@@ -190,16 +190,11 @@ class JavaPropertiesConfigurationValidator implements ConfigurationValidator {
throw new ConfigurationValidationException("Invalid property name: " + propertyName);
}
// Check against its type requirement predicate
try {
if (!validation.get(propertyName).test(value)) {
throw new ConfigurationValidationException(
"Invalid value '" + value + "' for property '" + propertyName + "'"
);
}
} catch (RuntimeException e) {
throw new ConfigurationValidationException(e.getMessage(), e);
if (!validation.get(propertyName).test(value)) {
throw new ConfigurationValidationException(
"Invalid value '" + value + "' for property '" + propertyName + "'"
);
}
}
// Validation Predicates
......
......@@ -129,12 +129,4 @@ public class JavaPropertiesConfigurationParserTest {
Assertions.assertThrows(NumberFormatException.class, () -> mPrinterConfig.getProperty("raster.cellDistance.horizontal").toInt());
Assertions.assertThrows(NumberFormatException.class, () -> mPrinterConfig.getProperty("name").toDouble());
}
@Test
public void testWrongCapability() {
Assertions.assertThrows(ConfigurationValidationException.class, () -> {
String configPath = getResource("config/wrongPrinterModeExample.properties").getAbsolutePath();
ConfigurationParser configParser = new JavaPropertiesConfigurationParser(configPath, mDefaultConfigPath);
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment