Пример #1
0
  @Test
  public void testCanChangeStatus() {
    statusHolder.changeStatus("foo", DirectoryStatus.INDEXING);

    DirectoryStatus status = statusHolder.getStatus("foo");

    assertThat(status).isSameAs(DirectoryStatus.INDEXING);
  }
Пример #2
0
 @Test(expected = IllegalArgumentException.class)
 public void testGetStatusFailsWithEmptyWhitespaceDirectory() {
   statusHolder.getStatus(" ");
 }
Пример #3
0
  @Test
  public void testHasNoAvailableAsDefaultStatus() {
    DirectoryStatus status = statusHolder.getStatus("foo");

    assertThat(status).isSameAs(DirectoryStatus.NOT_AVAILABLE);
  }
Пример #4
0
 @Test(expected = IllegalArgumentException.class)
 public void testGetStatusFailsWithNullDirectory() {
   statusHolder.getStatus(null);
 }