Package org.sonar.api.server.debt.internal

Examples of org.sonar.api.server.debt.internal.DefaultDebtCharacteristic.parentId()


    DefaultDebtCharacteristic result = (DefaultDebtCharacteristic) service.create("Compilation name", 1);

    assertThat(result.id()).isEqualTo(currentId);
    assertThat(result.key()).isEqualTo("COMPILATION_NAME");
    assertThat(result.name()).isEqualTo("Compilation name");
    assertThat(result.parentId()).isEqualTo(1);
    assertThat(result.createdAt()).isEqualTo(now);
  }

  @Test
  public void fail_to_create_sub_characteristic_when_parent_id_is_not_a_root_characteristic() {
View Full Code Here


    DefaultDebtCharacteristic characteristic = (DefaultDebtCharacteristic) service.characteristicById(1);
    assertThat(characteristic.id()).isEqualTo(1);
    assertThat(characteristic.key()).isEqualTo("MEMORY_EFFICIENCY");
    assertThat(characteristic.name()).isEqualTo("Memory use");
    assertThat(characteristic.order()).isEqualTo(2);
    assertThat(characteristic.parentId()).isNull();

    assertThat(service.characteristicById(111)).isNull();
  }

  @Test
View Full Code Here

    DefaultDebtCharacteristic characteristic = (DefaultDebtCharacteristic) service.characteristicByKey("MEMORY_EFFICIENCY");
    assertThat(characteristic.id()).isEqualTo(1);
    assertThat(characteristic.key()).isEqualTo("MEMORY_EFFICIENCY");
    assertThat(characteristic.name()).isEqualTo("Memory use");
    assertThat(characteristic.order()).isEqualTo(2);
    assertThat(characteristic.parentId()).isNull();

    assertThat(service.characteristicByKey("UNKNOWN")).isNull();
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.