Code example for DeadEvent

Methods: getEvent

0
    @Test
    public void testDeadEvent() { 
        eventPublisher.createNoSubscribedEvent();
        assertThat(deadEventSubscriber.deadEvents.size(), is(1));
        DeadEvent deadEvent = deadEventSubscriber.deadEvents.get(0);
        assertSame(deadEvent.getEvent().getClass(), NoSubscriberEvent.class);
    } 
 
 
    @Test
    public void testCreditCardPurchaseEventReceived() { 
        generateCreditPurchaseEvent(); 
        assertThat(cashPurchaseEventSubscriber.getHandledEvents().size(), is(0));
        assertThat(creditPurchaseEventSubscriber.getHandledEvents().size(), is(1));
        assertSame(creditPurchaseEventSubscriber.getHandledEvents().get(0).getClass(), CreditPurchaseEvent.class);
    } 
 
 
    @Test
    public void testGetAllPurchaseEvents() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE