Examples of characteristicByKey()


Examples of org.sonar.api.batch.debt.DebtModel.characteristicByKey()

    when(dao.selectEnabledCharacteristics()).thenReturn(newArrayList(rootCharacteristicDto, characteristicDto));

    DebtModel result = provider.provide(dao);
    assertThat(result.characteristics()).hasSize(1);

    DebtCharacteristic characteristic = result.characteristicByKey("MEMORY_EFFICIENCY");
    assertThat(characteristic.key()).isEqualTo("MEMORY_EFFICIENCY");
    assertThat(characteristic.name()).isEqualTo("Memory use");
    assertThat(characteristic.isSub()).isFalse();
    assertThat(characteristic.order()).isEqualTo(1);
View Full Code Here

Examples of org.sonar.api.batch.debt.DebtModel.characteristicByKey()

    assertThat(characteristic.key()).isEqualTo("MEMORY_EFFICIENCY");
    assertThat(characteristic.name()).isEqualTo("Memory use");
    assertThat(characteristic.isSub()).isFalse();
    assertThat(characteristic.order()).isEqualTo(1);

    DebtCharacteristic subCharacteristic = result.characteristicByKey("EFFICIENCY");
    assertThat(subCharacteristic.key()).isEqualTo("EFFICIENCY");
    assertThat(subCharacteristic.name()).isEqualTo("Efficiency");
    assertThat(subCharacteristic.isSub()).isTrue();
    assertThat(subCharacteristic.order()).isNull();
  }
View Full Code Here

Examples of org.sonar.server.debt.DebtModelXMLExporter.DebtModel.characteristicByKey()

  @Test
  public void convert_network_use_key() throws Exception {
    String xml = getFileContent("convert_network_use_key.xml");

    DebtModel debtModel = new DebtCharacteristicsXMLImporter().importXML(xml);
    assertThat(debtModel.characteristicByKey("NETWORK_USE_EFFICIENCY")).isNull();
    assertThat(debtModel.characteristicByKey("NETWORK_USE")).isNotNull();
  }

  @Test
  public void fail_on_bad_xml() throws Exception {
View Full Code Here

Examples of org.sonar.server.debt.DebtModelXMLExporter.DebtModel.characteristicByKey()

  public void convert_network_use_key() throws Exception {
    String xml = getFileContent("convert_network_use_key.xml");

    DebtModel debtModel = new DebtCharacteristicsXMLImporter().importXML(xml);
    assertThat(debtModel.characteristicByKey("NETWORK_USE_EFFICIENCY")).isNull();
    assertThat(debtModel.characteristicByKey("NETWORK_USE")).isNotNull();
  }

  @Test
  public void fail_on_bad_xml() throws Exception {
    String xml = getFileContent("fail_on_bad_xml.xml");
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.