@Test public void commit_DELETED_FILES() throws IOException { ContentFileTransactionContext context = new ContentFileTransactionContext(contentDir, deletedTmpDir); File file1 = createFile(deletedTmpDir, "file1.txt", "content1"); File file2 = createFile(deletedTmpDir, "file2.txt", "content2"); contentFileCommitRollbackService.commit(context); assertFalse(file1.exists()); assertFalse(file2.exists()); assertFalse(deletedTmpDir.exists()); }
public void commit(ContentFileTransactionContext context) throws IOException { Preconditions.checkNotNull(context); File deletedTmpDirectory = context.getDeletedTmpDirectory(); FileUtils.deleteDirectory(deletedTmpDirectory); }
ContentFileCommitRollbackService { public void commit(ContentFileTransactionContext context) throws IOException { Preconditions.checkNotNull(context); File deletedTmpDirectory = context.getDeletedTmpDirectory(); FileUtils.deleteDirectory(deletedTmpDirectory); } }
ContentFileCommitRollbackService { public void commit(ContentFileTransactionContext context) throws IOException { Preconditions.checkNotNull(context); File deletedTmpDirectory = context.getDeletedTmpDirectory(); FileUtils.deleteDirectory(deletedTmpDirectory); }  }
ContentFileCommitRollbackService { public void commit(ContentFileTransactionContext context) throws IOException { Preconditions.checkNotNull(context); File deletedTmpDirectory = context.getDeletedTmpDirectory(); FileUtils.deleteDirectory(deletedTmpDirectory); }  void commit(ContentFileTransactionContext context); void rollback(ContentFileTransactionContext context); }
ContentFileCommitRollbackService { public void commit(ContentFileTransactionContext context) throws IOException { Preconditions.checkNotNull(context); File deletedTmpDirectory = context.getDeletedTmpDirectory(); FileUtils.deleteDirectory(deletedTmpDirectory); }  void commit(ContentFileTransactionContext context); void rollback(ContentFileTransactionContext context);  }