Package org.apache.cloudstack.framework.events

Examples of org.apache.cloudstack.framework.events.EventTopic


        assertTrue(name.equals(bus.getName()));
    }

    @Test
    public void testSubscribe() throws Exception {
        EventTopic topic = mock(EventTopic.class);
        EventSubscriber subscriber = mock(EventSubscriber.class);

        InMemoryEventBus bus = new InMemoryEventBus();

        UUID uuid = bus.subscribe(topic, subscriber);
View Full Code Here


        bus.subscribe(null, subscriber);
    }

    @Test(expected = EventBusException.class)
    public void testSubscribeFailSubscriber() throws Exception {
        EventTopic topic = mock(EventTopic.class);

        InMemoryEventBus bus = new InMemoryEventBus();

        bus.subscribe(topic, null);
    }
View Full Code Here

        bus.subscribe(topic, null);
    }

    @Test
    public void testUnsubscribe() throws Exception {
        EventTopic topic = mock(EventTopic.class);
        EventSubscriber subscriber = mock(EventSubscriber.class);

        InMemoryEventBus bus = new InMemoryEventBus();

        UUID uuid = bus.subscribe(topic, subscriber);
View Full Code Here

        bus.unsubscribe(uuid, subscriber);
    }

    @Test
    public void testPublish() throws Exception {
        EventTopic topic = mock(EventTopic.class);
        EventSubscriber subscriber = mock(EventSubscriber.class);
        Event event = mock(Event.class);

        InMemoryEventBus bus = new InMemoryEventBus();
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.framework.events.EventTopic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.