@Test(expected = IllegalArgumentException.class) public void dirFactoryInvalidDirectory() { when(directory.isDirectory()).thenReturn(Boolean.FALSE); FileOrDirectoryTaskOutput.directory(directory); }
public static FileOrDirectoryTaskOutput directory(File directory) { if (directory == null || !directory.isDirectory()) { throw new IllegalArgumentException("A not null directory instance is expected. Path: " + directory); } return new FileOrDirectoryTaskOutput(directory); }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput directory(File directory) { if (directory == null || !directory.isDirectory()) { throw new IllegalArgumentException("A not null directory instance is expected. Path: " + directory); } return new FileOrDirectoryTaskOutput(directory); } }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput directory(File directory) { if (directory == null || !directory.isDirectory()) { throw new IllegalArgumentException("A not null directory instance is expected. Path: " + directory); } return new FileOrDirectoryTaskOutput(directory); } FileOrDirectoryTaskOutput(File file); }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput directory(File directory) { if (directory == null || !directory.isDirectory()) { throw new IllegalArgumentException("A not null directory instance is expected. Path: " + directory); } return new FileOrDirectoryTaskOutput(directory); } FileOrDirectoryTaskOutput(File file); @Override File getDestination(); @Override void accept(TaskOutputDispatcher writer); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static FileOrDirectoryTaskOutput file(File file); static FileOrDirectoryTaskOutput directory(File directory); }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput directory(File directory) { if (directory == null || !directory.isDirectory()) { throw new IllegalArgumentException("A not null directory instance is expected. Path: " + directory); } return new FileOrDirectoryTaskOutput(directory); } FileOrDirectoryTaskOutput(File file); @Override File getDestination(); @Override void accept(TaskOutputDispatcher writer); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static FileOrDirectoryTaskOutput file(File file); static FileOrDirectoryTaskOutput directory(File directory);  }