@Test public void deleteAttachmentTest() throws Exception { getMockery().checking(new Expectations() { { oneOf(mockAttachVersionStore).deleteArchive(mockAttach, mockContext, false); exactly(2).of(mockHibernateSession).delete(with(any(Object.class))); } }); this.createFile(); this.attachStore.deleteXWikiAttachment(this.mockAttach, false, this.mockContext, false); Assert.assertFalse("The attachment file was not deleted.", this.storeFile.exists()); }
@Override public void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context, final boolean bTransaction) throws XWikiException { this.deleteXWikiAttachment(attachment, true, context, bTransaction); }
FilesystemAttachmentStore implements XWikiAttachmentStoreInterface { @Override public void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context, final boolean bTransaction) throws XWikiException { this.deleteXWikiAttachment(attachment, true, context, bTransaction); } }
FilesystemAttachmentStore implements XWikiAttachmentStoreInterface { @Override public void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context, final boolean bTransaction) throws XWikiException { this.deleteXWikiAttachment(attachment, true, context, bTransaction); }  }
FilesystemAttachmentStore implements XWikiAttachmentStoreInterface { @Override public void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context, final boolean bTransaction) throws XWikiException { this.deleteXWikiAttachment(attachment, true, context, bTransaction); }  @Override String getHint(); @Override void saveAttachmentContent(final XWikiAttachment attachment, final XWikiContext context,
        final boolean bTransaction); @Override void saveAttachmentContent(final XWikiAttachment attachment, final boolean updateDocument,
        final XWikiContext context, final boolean bTransaction); @Override void saveAttachmentsContent(final List<XWikiAttachment> attachments, final XWikiDocument doc,
        final boolean updateDocument, final XWikiContext context, final boolean bTransaction); @Override void loadAttachmentContent(final XWikiAttachment attachment, final XWikiContext context,
        final boolean bTransaction); @Override void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context,
        final boolean bTransaction); @Override void deleteXWikiAttachment(final XWikiAttachment attachment, final boolean parentUpdate,
        final XWikiContext context, final boolean bTransaction); @Override void cleanUp(XWikiContext context); }
FilesystemAttachmentStore implements XWikiAttachmentStoreInterface { @Override public void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context, final boolean bTransaction) throws XWikiException { this.deleteXWikiAttachment(attachment, true, context, bTransaction); }  @Override String getHint(); @Override void saveAttachmentContent(final XWikiAttachment attachment, final XWikiContext context,
        final boolean bTransaction); @Override void saveAttachmentContent(final XWikiAttachment attachment, final boolean updateDocument,
        final XWikiContext context, final boolean bTransaction); @Override void saveAttachmentsContent(final List<XWikiAttachment> attachments, final XWikiDocument doc,
        final boolean updateDocument, final XWikiContext context, final boolean bTransaction); @Override void loadAttachmentContent(final XWikiAttachment attachment, final XWikiContext context,
        final boolean bTransaction); @Override void deleteXWikiAttachment(final XWikiAttachment attachment, final XWikiContext context,
        final boolean bTransaction); @Override void deleteXWikiAttachment(final XWikiAttachment attachment, final boolean parentUpdate,
        final XWikiContext context, final boolean bTransaction); @Override void cleanUp(XWikiContext context);  }