@Test void deleteFileTest() throws Exception { FileEntry fileEntry = addTestFile(SPACE_1, NAMESPACE_1); boolean deleteFile = fileService.deleteFile(SPACE_2, fileEntry.getId()); assertFalse(deleteFile); Mockito.verify(fileStorage) .deleteFile(Mockito.eq(fileEntry.getId()), Mockito.eq(SPACE_2)); deleteFile = fileService.deleteFile(SPACE_1, fileEntry.getId()); assertTrue(deleteFile); Mockito.verify(fileStorage) .deleteFile(Mockito.eq(fileEntry.getId()), Mockito.eq(SPACE_1)); }
public boolean deleteFile(String space, String id) throws FileStorageException { fileStorage.deleteFile(id, space); return deleteFileAttribute(space, id); }
FileService { public boolean deleteFile(String space, String id) throws FileStorageException { fileStorage.deleteFile(id, space); return deleteFileAttribute(space, id); } }
FileService { public boolean deleteFile(String space, String id) throws FileStorageException { fileStorage.deleteFile(id, space); return deleteFileAttribute(space, id); } FileService(DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage);  FileService(String tableName, DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage); protected  FileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider, FileStorage fileStorage); }
FileService { public boolean deleteFile(String space, String id) throws FileStorageException { fileStorage.deleteFile(id, space); return deleteFileAttribute(space, id); } FileService(DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage);  FileService(String tableName, DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage); protected  FileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider, FileStorage fileStorage); FileEntry addFile(String space, String namespace, String name, InputStream inputStream); FileEntry addFile(String space, String namespace, String name, File existingFile); List<FileEntry> listFiles(String space, String namespace); FileEntry getFile(String space, String id); void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer); T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); int deleteBySpaceAndNamespace(String space, String namespace); int deleteBySpace(String space); int deleteModifiedBefore(Date modificationTime); boolean deleteFile(String space, String id); int deleteFilesEntriesWithoutContent(); }
FileService { public boolean deleteFile(String space, String id) throws FileStorageException { fileStorage.deleteFile(id, space); return deleteFileAttribute(space, id); } FileService(DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage);  FileService(String tableName, DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage); protected  FileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider, FileStorage fileStorage); FileEntry addFile(String space, String namespace, String name, InputStream inputStream); FileEntry addFile(String space, String namespace, String name, File existingFile); List<FileEntry> listFiles(String space, String namespace); FileEntry getFile(String space, String id); void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer); T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); int deleteBySpaceAndNamespace(String space, String namespace); int deleteBySpace(String space); int deleteModifiedBefore(Date modificationTime); boolean deleteFile(String space, String id); int deleteFilesEntriesWithoutContent();  }