use of org.xwiki.model.reference.BlockReference in project xwiki-platform by xwiki.
the class DefaultSignatureStoreTest method testRetrievingMissingSignature.
@Test
public void testRetrievingMissingSignature() throws Exception {
XWikiDocument sourceDocument = mock(XWikiDocument.class);
when(this.xwiki.getDocument(new DocumentReference("wiki", "space", "document"), this.xcontext)).thenReturn(sourceDocument);
assertThat(this.store.retrieve(new BlockReference("block", new DocumentReference("wiki", "space", "document"))), nullValue());
verify(sourceDocument).getXObject(new DocumentReference(DefaultSignatureStore.SIGNATURECLASS, new WikiReference("wiki")), DefaultSignatureStore.SIGNATURECLASS_PROP_REFERENCE, "block");
}
Aggregations