/** Verify {@link BaseProjectProperty#getCascadingValue()} method. */ @Test public void testGetCascadingValue() { String parentValue = "parentValue"; // If project doesn't have cascading project - default value is used as cascading value. assertEquals(property.getDefaultValue(), property.getCascadingValue()); project.setCascadingProject(parent); property = new BaseProjectProperty(project); property.setKey(propertyKey); // If project has cascading project and cascading value is not set - default value is used. assertEquals(property.getDefaultValue(), property.getCascadingValue()); BaseProjectProperty parentProperty = new BaseProjectProperty(parent); parentProperty.setKey(propertyKey); parentProperty.setValue(parentValue); parent.putProjectProperty(propertyKey, parentProperty); project.setCascadingProject(parent); property = new BaseProjectProperty(project); property.setKey(propertyKey); property.setValue(parentValue); // If project has cascading project and cascading value is set - property value will be used. assertEquals(parentProperty.getOriginalValue(), property.getCascadingValue()); }
/** Verify {@link BaseProjectProperty#getDefaultValue()} method. */ @Test public void testGetDefaultValue() { assertNull(property.getDefaultValue()); }