use of hudson.matrix.AxisList in project hudson-2.x by hudson.
the class AxisListProjectPropertyTest method testAxisListProjectPropertyGetDefaultValue.
/**
* Verify {@link CopyOnWriteListProjectProperty#getDefaultValue()} method.
*/
@Test
public void testAxisListProjectPropertyGetDefaultValue() {
AxisList defaultValue = property.getDefaultValue();
assertNotNull(defaultValue);
assertTrue(defaultValue.isEmpty());
}
use of hudson.matrix.AxisList in project hudson-2.x by hudson.
the class BaseProjectPropertyTest method testAllowOverrideValue.
/**
* Verify {@link BaseProjectProperty#allowOverrideValue(Object, Object)} method.
*/
@Test
public void testAllowOverrideValue() {
assertFalse(property.allowOverrideValue(null, null));
assertTrue(property.allowOverrideValue(new Object(), null));
assertTrue(property.allowOverrideValue(null, new Object()));
//Test properties that don't have correct equals methods
assertFalse(property.allowOverrideValue(new JavadocArchiver("", false), new JavadocArchiver("", false)));
assertTrue(property.allowOverrideValue(new JavadocArchiver("", true), new JavadocArchiver("", false)));
//Object with transient filds should be taken into account
assertTrue(property.allowOverrideValue(new AxisList(new Axis("DB", "mysql")), new AxisList()));
assertTrue(property.allowOverrideValue(new AxisList(new Axis("DB", "mysql")), new AxisList(new Axis("DB", "mysql", "mssql"))));
assertTrue(property.allowOverrideValue(new AxisList(new Axis("DB", "mysql")), new AxisList(new Axis("DB", "mssql"))));
}
Aggregations