Search in sources :

Example 1 with AxisList

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());
}
Also used : AxisList(hudson.matrix.AxisList) Test(org.junit.Test)

Example 2 with AxisList

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"))));
}
Also used : AxisList(hudson.matrix.AxisList) JavadocArchiver(hudson.tasks.JavadocArchiver) Axis(hudson.matrix.Axis) Test(org.junit.Test)

Aggregations

AxisList (hudson.matrix.AxisList)2 Test (org.junit.Test)2 Axis (hudson.matrix.Axis)1 JavadocArchiver (hudson.tasks.JavadocArchiver)1