@Test(expected = Directory.DirectoryNotSpecifiedException.class) public void validateShouldFailIfPathNotSpecified() throws CruiseControlException { Directory directory = new Directory(); directory.validate(); }
public void validate() throws CruiseControlException { if (directory == null) { throw new DirectoryNotSpecifiedException("directory"); } if (!exists()) { throw new DirectoryDoesNotExistException(); } if (!isDirectory()) { throw new FileInsteadOfDirectoryException(); } }
Directory implements Serializable { public void validate() throws CruiseControlException { if (directory == null) { throw new DirectoryNotSpecifiedException("directory"); } if (!exists()) { throw new DirectoryDoesNotExistException(); } if (!isDirectory()) { throw new FileInsteadOfDirectoryException(); } } }
Directory implements Serializable { public void validate() throws CruiseControlException { if (directory == null) { throw new DirectoryNotSpecifiedException("directory"); } if (!exists()) { throw new DirectoryDoesNotExistException(); } if (!isDirectory()) { throw new FileInsteadOfDirectoryException(); } }  }
Directory implements Serializable { public void validate() throws CruiseControlException { if (directory == null) { throw new DirectoryNotSpecifiedException("directory"); } if (!exists()) { throw new DirectoryDoesNotExistException(); } if (!isDirectory()) { throw new FileInsteadOfDirectoryException(); } }  void validate(); boolean exists(); boolean isDirectory(); void setPath(String path); File toFile(); }
Directory implements Serializable { public void validate() throws CruiseControlException { if (directory == null) { throw new DirectoryNotSpecifiedException("directory"); } if (!exists()) { throw new DirectoryDoesNotExistException(); } if (!isDirectory()) { throw new FileInsteadOfDirectoryException(); } }  void validate(); boolean exists(); boolean isDirectory(); void setPath(String path); File toFile();  }