use of com.enonic.xp.content.ContentNotFoundException in project xp by enonic.
the class DeleteContentHandlerTest method deleteByPath_notFound.
@Test
public void deleteByPath_notFound() throws Exception {
final ContentPath path = ContentPath.from("/a/b");
Mockito.when(this.contentService.deleteWithoutFetch(Mockito.any())).thenThrow(new ContentNotFoundException(path, null));
runFunction("/test/DeleteContentHandlerTest.js", "deleteByPath_notFound");
}
use of com.enonic.xp.content.ContentNotFoundException in project xp by enonic.
the class GetAttachmentsHandlerTest method getById_notFound.
@Test
public void getById_notFound() throws Exception {
final ContentId id = ContentId.from("123456");
Mockito.when(this.contentService.getById(id)).thenThrow(new ContentNotFoundException(id, null));
runFunction("/test/GetAttachmentsHandlerTest.js", "getById_notFound");
}
use of com.enonic.xp.content.ContentNotFoundException in project xp by enonic.
the class GetAttachmentsHandlerTest method getByPath_notFound.
@Test
public void getByPath_notFound() throws Exception {
final ContentPath path = ContentPath.from("/a/b/mycontent");
Mockito.when(this.contentService.getByPath(path)).thenThrow(new ContentNotFoundException(path, null));
runFunction("/test/GetAttachmentsHandlerTest.js", "getByPath_notFound");
}
use of com.enonic.xp.content.ContentNotFoundException in project xp by enonic.
the class GetContentHandlerTest method getByPathAndVersionId_NotFound.
@Test
public void getByPathAndVersionId_NotFound() {
final ContentPath path = ContentPath.from("/a/b/mycontent");
final ContentVersionId versionId = ContentVersionId.from("versionId");
Mockito.when(this.contentService.getByPathAndVersionId(path, versionId)).thenThrow(new ContentNotFoundException(path, versionId, ContextAccessor.current().getBranch()));
runFunction("/test/GetContentHandlerTest.js", "getByPathAndVersionId_notFound");
}
use of com.enonic.xp.content.ContentNotFoundException in project xp by enonic.
the class GetAttachmentStreamHandlerTest method getByPath_notFound.
@Test
public void getByPath_notFound() throws Exception {
final ContentPath path = ContentPath.from("/a/b/mycontent");
Mockito.when(this.contentService.getByPath(path)).thenThrow(new ContentNotFoundException(path, null));
runFunction("/test/GetAttachmentStreamHandlerTest.js", "getAttachmentStreamByPath_notFound");
}
Aggregations