Package org.sonar.core.measure.db

Examples of org.sonar.core.measure.db.MetricDto


  @Test
  public void get_by_key() throws Exception {
    setupData("shared");

    MetricDto result = dao.getNullableByKey(session, "coverage");
    assertThat(result.getId()).isEqualTo(2);
    assertThat(result.getName()).isEqualTo("coverage");
    assertThat(result.getValueType()).isEqualTo("PERCENT");
    assertThat(result.getDescription()).isEqualTo("Coverage by unit tests");
    assertThat(result.getDirection()).isEqualTo(1);
    assertThat(result.isQualitative()).isTrue();
    assertThat(result.isUserManaged()).isFalse();
    assertThat(result.getWorstValue()).isEqualTo(0d);
    assertThat(result.getBestValue()).isEqualTo(100d);
    assertThat(result.isOptimizedBestValue()).isFalse();
    assertThat(result.isEnabled()).isTrue();

    // Disabled metrics are returned
    result = dao.getNullableByKey(session, "disabled");
    assertThat(result.getId()).isEqualTo(3);
    assertThat(result.isEnabled()).isFalse();
  }
View Full Code Here

TOP

Related Classes of org.sonar.core.measure.db.MetricDto

Copyright © 2018 www.massapicom. 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.