use of com.epam.pipeline.manager.preference.AbstractSystemPreference in project cloud-pipeline by epam.
the class SystemPreferencesValidationTest method testGreater.
private void testGreater(AbstractSystemPreference preference, int value) {
Preference pref = new Preference();
pref.setName(preference.getKey());
pref.setValue(Integer.toString(value + 1));
Assert.assertTrue(preferences.isValid(pref, null));
pref.setValue(Integer.toString(value - 1));
Assert.assertFalse(preferences.isValid(pref, null));
}
use of com.epam.pipeline.manager.preference.AbstractSystemPreference in project cloud-pipeline by epam.
the class SystemPreferencesValidationTest method testNoValidation.
private void testNoValidation(AbstractSystemPreference preference) {
Preference pref = new Preference();
pref.setName(preference.getKey());
pref.setValue("whatever");
Assert.assertTrue(preferences.isValid(pref, null));
}
use of com.epam.pipeline.manager.preference.AbstractSystemPreference in project cloud-pipeline by epam.
the class SystemPreferencesValidationTest method testBoolean.
private void testBoolean(AbstractSystemPreference preference) {
Preference pref = new Preference();
pref.setName(preference.getKey());
pref.setValue("true");
Assert.assertTrue(preferences.isValid(pref, null));
pref.setValue("false");
Assert.assertTrue(preferences.isValid(pref, null));
pref.setValue("whatever");
Assert.assertFalse(preferences.isValid(pref, null));
}
Aggregations