use of com.celements.common.cache.CacheLoadingException in project celements-blog by celements.
the class BlogCacheTest method testGetCachedDocRefs_QueryException.
@Test
public void testGetCachedDocRefs_QueryException() throws Exception {
WikiReference wikiRef = new WikiReference("wiki");
SpaceReference spaceRef = new SpaceReference("blogSpace", wikiRef);
expectXWQL(wikiRef, null);
replayDefault();
try {
cache.getCachedDocRefs(spaceRef);
fail("expecting CacheLoadingException");
} catch (CacheLoadingException exc) {
// expected
}
verifyDefault();
}
use of com.celements.common.cache.CacheLoadingException in project celements-blog by celements.
the class BlogCacheTest method testGetCachedDocRefs_XWikiException.
@Test
public void testGetCachedDocRefs_XWikiException() throws Exception {
WikiReference wikiRef = new WikiReference("wiki");
SpaceReference spaceRef = new SpaceReference("blogSpace", wikiRef);
DocumentReference docRef = new DocumentReference(wikiRef.getName(), "space", "blog1");
expectXWQL(wikiRef, Arrays.asList(docRef));
expect(cache.blogService.getBlogSpaceRef(eq(docRef))).andThrow(new XWikiException()).once();
replayDefault();
try {
cache.getCachedDocRefs(spaceRef);
fail("expecting CacheLoadingException");
} catch (CacheLoadingException exc) {
// expected
}
verifyDefault();
}
Aggregations