use of com.izforge.izpack.api.installer.DataValidator in project robozonky by RoboZonky.
the class StrategySettingsValidatorTest method fileMissing.
@Test
void fileMissing() throws IOException {
final File f = File.createTempFile("robozonky-", ".cfg");
Assumptions.assumeTrue(f.delete());
final InstallData d = StrategySettingsValidatorTest.mockInstallData(f);
// execute sut
final DataValidator validator = new StrategySettingsValidator();
final DataValidator.Status result = validator.validateData(d);
// execute test
assertThat(result).isEqualTo(DataValidator.Status.WARNING);
}
use of com.izforge.izpack.api.installer.DataValidator in project robozonky by RoboZonky.
the class StrategySettingsValidatorTest method urlWrong.
@Test
void urlWrong() throws IOException {
final File f = File.createTempFile("robozonky-", ".cfg");
Assumptions.assumeTrue(f.delete());
final InstallData d = StrategySettingsValidatorTest.mockInstallData(f.toURI().toURL());
// execute sut
final DataValidator validator = new StrategySettingsValidator();
final DataValidator.Status result = validator.validateData(d);
// execute test
assertThat(result).isEqualTo(DataValidator.Status.WARNING);
}
use of com.izforge.izpack.api.installer.DataValidator in project robozonky by RoboZonky.
the class ZonkoidSettingsValidatorTest method messages.
@Test
void messages() {
final DataValidator validator = new ZonkoidSettingsValidator();
assertSoftly(softly -> {
softly.assertThat(validator.getDefaultAnswer()).isFalse();
softly.assertThat(validator.getWarningMessageId()).isNotEmpty();
softly.assertThat(validator.getErrorMessageId()).isNotEmpty();
softly.assertThat(validator.getErrorMessageId()).isNotEqualTo(validator.getWarningMessageId());
});
}
use of com.izforge.izpack.api.installer.DataValidator in project robozonky by RoboZonky.
the class StrategySettingsValidatorTest method messages.
@Test
void messages() {
final DataValidator validator = new StrategySettingsValidator();
assertSoftly(softly -> {
softly.assertThat(validator.getDefaultAnswer()).isFalse();
softly.assertThat(validator.getWarningMessageId()).isNotEmpty();
softly.assertThat(validator.getErrorMessageId()).isNotEmpty();
softly.assertThat(validator.getErrorMessageId()).isNotEqualTo(validator.getWarningMessageId());
});
}
Aggregations