@Test public void testCanChangeStatus() { statusHolder.changeStatus("foo", DirectoryStatus.INDEXING); DirectoryStatus status = statusHolder.getStatus("foo"); assertThat(status).isSameAs(DirectoryStatus.INDEXING); }
@Test(expected = IllegalArgumentException.class) public void testGetStatusFailsWithEmptyWhitespaceDirectory() { statusHolder.getStatus(" "); }
@Test public void testHasNoAvailableAsDefaultStatus() { DirectoryStatus status = statusHolder.getStatus("foo"); assertThat(status).isSameAs(DirectoryStatus.NOT_AVAILABLE); }
@Test(expected = IllegalArgumentException.class) public void testGetStatusFailsWithNullDirectory() { statusHolder.getStatus(null); }