コード例 #1
0
  @Test
  public void readComponentMeasures_is_not_cached() {
    writer.writeComponentMeasures(COMPONENT_REF, of(MEASURE));

    assertThat(underTest.readComponentMeasures(COMPONENT_REF))
        .isNotSameAs(underTest.readComponentMeasures(COMPONENT_REF));
  }
コード例 #2
0
  @Test
  public void verify_readComponentMeasures_returns_measures() {
    writer.writeComponentMeasures(COMPONENT_REF, of(MEASURE));

    try (CloseableIterator<BatchReport.Measure> measures =
        underTest.readComponentMeasures(COMPONENT_REF)) {
      assertThat(measures.next()).isEqualTo(MEASURE);
      assertThat(measures.hasNext()).isFalse();
    }
  }
コード例 #3
0
 @Test
 public void readComponentMeasures_returns_empty_list_if_there_is_no_measure() {
   assertThat(underTest.readComponentMeasures(COMPONENT_REF)).isEmpty();
 }