コード例 #1
0
  @Test
  public void readComponentDuplications_it_not_cached() {
    writer.writeComponentDuplications(COMPONENT_REF, of(DUPLICATION));

    assertThat(underTest.readComponentDuplications(COMPONENT_REF))
        .isNotSameAs(underTest.readComponentDuplications(COMPONENT_REF));
  }
コード例 #2
0
  @Test
  public void verify_readComponentDuplications_returns_Issues() {
    writer.writeComponentDuplications(COMPONENT_REF, of(DUPLICATION));

    try (CloseableIterator<BatchReport.Duplication> res =
        underTest.readComponentDuplications(COMPONENT_REF)) {
      assertThat(res.next()).isEqualTo(DUPLICATION);
      assertThat(res.hasNext()).isFalse();
    }
  }