Search in sources :

Example 51 with Event

use of org.xwiki.observation.event.Event in project celements-blog by celements.

the class BlogUpdateListenerTest method testUpdatedEvent.

@Test
public void testUpdatedEvent() {
    Event event = listener.getUpdatedEvent(null);
    assertNotNull(event);
    assertSame(BlogUpdatedEvent.class, event.getClass());
    assertTrue(event.matches(new BlogUpdatedEvent()));
    assertNotSame(listener.getUpdatedEvent(null), event);
}
Also used : BlogCreatingEvent(com.celements.blog.observation.event.BlogCreatingEvent) BlogDeletedEvent(com.celements.blog.observation.event.BlogDeletedEvent) BlogDeletingEvent(com.celements.blog.observation.event.BlogDeletingEvent) BlogUpdatedEvent(com.celements.blog.observation.event.BlogUpdatedEvent) BlogUpdatingEvent(com.celements.blog.observation.event.BlogUpdatingEvent) Event(org.xwiki.observation.event.Event) BlogCreatedEvent(com.celements.blog.observation.event.BlogCreatedEvent) BlogUpdatedEvent(com.celements.blog.observation.event.BlogUpdatedEvent) Test(org.junit.Test)

Example 52 with Event

use of org.xwiki.observation.event.Event in project celements-blog by celements.

the class BlogUpdateListenerTest method testCreatedEvent.

@Test
public void testCreatedEvent() {
    Event event = listener.getCreatedEvent(null);
    assertNotNull(event);
    assertSame(BlogCreatedEvent.class, event.getClass());
    assertTrue(event.matches(new BlogCreatedEvent()));
    assertNotSame(listener.getCreatedEvent(null), event);
}
Also used : BlogCreatedEvent(com.celements.blog.observation.event.BlogCreatedEvent) BlogCreatingEvent(com.celements.blog.observation.event.BlogCreatingEvent) BlogDeletedEvent(com.celements.blog.observation.event.BlogDeletedEvent) BlogDeletingEvent(com.celements.blog.observation.event.BlogDeletingEvent) BlogUpdatedEvent(com.celements.blog.observation.event.BlogUpdatedEvent) BlogUpdatingEvent(com.celements.blog.observation.event.BlogUpdatingEvent) Event(org.xwiki.observation.event.Event) BlogCreatedEvent(com.celements.blog.observation.event.BlogCreatedEvent) Test(org.junit.Test)

Example 53 with Event

use of org.xwiki.observation.event.Event in project celements-blog by celements.

the class ArticleCreateListenerTest method testCreatingEvent.

@Test
public void testCreatingEvent() {
    Event event = listener.getCreatingEvent(null);
    assertNotNull(event);
    assertSame(ArticleCreatingEvent.class, event.getClass());
    assertTrue(event.matches(new ArticleCreatingEvent()));
    assertNotSame(listener.getCreatingEvent(null), event);
}
Also used : ArticleCreatingEvent(com.celements.blog.observation.event.ArticleCreatingEvent) ArticleCreatingEvent(com.celements.blog.observation.event.ArticleCreatingEvent) ArticleCreatedEvent(com.celements.blog.observation.event.ArticleCreatedEvent) Event(org.xwiki.observation.event.Event) Test(org.junit.Test)

Example 54 with Event

use of org.xwiki.observation.event.Event in project celements-blog by celements.

the class BlogDeleteListenerTest method testDeletingEvent.

@Test
public void testDeletingEvent() {
    Event event = listener.getDeletingEvent(null);
    assertNotNull(event);
    assertSame(BlogDeletingEvent.class, event.getClass());
    assertTrue(event.matches(new BlogDeletingEvent()));
    assertNotSame(listener.getDeletingEvent(null), event);
}
Also used : BlogDeletedEvent(com.celements.blog.observation.event.BlogDeletedEvent) BlogDeletingEvent(com.celements.blog.observation.event.BlogDeletingEvent) Event(org.xwiki.observation.event.Event) BlogDeletingEvent(com.celements.blog.observation.event.BlogDeletingEvent) Test(org.junit.Test)

Aggregations

Event (org.xwiki.observation.event.Event)54 Test (org.junit.Test)48 DocumentDeletedEvent (org.xwiki.bridge.event.DocumentDeletedEvent)23 DocumentUpdatedEvent (org.xwiki.bridge.event.DocumentUpdatedEvent)23 DocumentCreatedEvent (org.xwiki.bridge.event.DocumentCreatedEvent)21 ArticleCreatingEvent (com.celements.blog.observation.event.ArticleCreatingEvent)9 BaseObject (com.xpn.xwiki.objects.BaseObject)9 ArticleCreatedEvent (com.celements.blog.observation.event.ArticleCreatedEvent)8 ArticleDeletedEvent (com.celements.blog.observation.event.ArticleDeletedEvent)8 ArticleDeletingEvent (com.celements.blog.observation.event.ArticleDeletingEvent)8 BlogCreatedEvent (com.celements.blog.observation.event.BlogCreatedEvent)8 BlogCreatingEvent (com.celements.blog.observation.event.BlogCreatingEvent)8 BlogDeletedEvent (com.celements.blog.observation.event.BlogDeletedEvent)8 BlogDeletingEvent (com.celements.blog.observation.event.BlogDeletingEvent)8 XWikiDocument (com.xpn.xwiki.doc.XWikiDocument)8 ArticleUpdatingEvent (com.celements.blog.observation.event.ArticleUpdatingEvent)7 ArrayList (java.util.ArrayList)7 ArticleUpdatedEvent (com.celements.blog.observation.event.ArticleUpdatedEvent)6 BlogUpdatedEvent (com.celements.blog.observation.event.BlogUpdatedEvent)6 BlogUpdatingEvent (com.celements.blog.observation.event.BlogUpdatingEvent)6