Esempio n. 1
0
  @Test
  public void shouldEnsureThePublicationIsOpenBeforeReadingPosition() {
    publication.close();
    assertThat(publication.position(), is(Publication.CLOSED));

    final InOrder inOrder = Mockito.inOrder(conductorLock, conductor);
    inOrder.verify(conductorLock).lock();
    inOrder.verify(conductor).releasePublication(publication);
    inOrder.verify(conductorLock).unlock();
  }
Esempio n. 2
0
 @Test
 public void shouldReportInitialPosition() {
   assertThat(publication.position(), is(0L));
 }
Esempio n. 3
0
 @Test
 public void shouldEnsureThePublicationIsOpenBeforeReadingPosition() {
   publication.close();
   assertThat(publication.position(), is(Publication.CLOSED));
 }