Ejemplo n.º 1
0
  /** Verify {@link SCMProjectProperty#returnOriginalValue()} method. */
  @Test
  public void testReturnOriginalValue() {
    // If property is marked as overridden or original value is not null and not equals to default
    // value,
    // than original should be used.
    property.setOverridden(true);
    assertTrue(property.returnOriginalValue());
    property.setOriginalValue(new FakeSCM(), false);
    assertTrue(property.returnOriginalValue());

    // If property is not marked as overridden and original value is null or equals to default value
    // - use cascading.
    property.setOriginalValue(property.getDefaultValue(), false);
    assertFalse(property.returnOriginalValue());
    property.setOriginalValue(null, false);
    assertFalse(property.returnOriginalValue());
  }
Ejemplo n.º 2
0
 /** Verify {@link SCMProjectProperty#getDefaultValue()} method. */
 @Test
 public void testGetDefaultValue() {
   assertEquals(new NullSCM(), property.getDefaultValue());
 }