Package org.apache.tuscany.spi.event

Examples of org.apache.tuscany.spi.event.Event


*/
public class AbstractSCAObjectTestCase extends TestCase {

    public void testFireListener() {
        SCAObject object = new TestSCAObject("foo", null);
        Event event = new TestEvent();
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        listener.onEvent(EasyMock.same(event));
        EasyMock.expectLastCall();
        EasyMock.replay(listener);
        object.addListener(listener);
View Full Code Here


        object.publish(event);
    }

    public void testRemoveListener() {
        SCAObject object = new TestSCAObject("foo", null);
        Event event = new TestEvent();
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        EasyMock.replay(listener);
        object.addListener(listener);
        object.removeListener(listener);
        object.publish(event);
View Full Code Here

        object.publish(event);
    }

    public void testFalseFilterListener() {
        SCAObject object = new TestSCAObject("foo", null);
        Event event = new TestEvent();
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        EasyMock.replay(listener);
        object.addListener(new FalseFilter(), listener);
        object.publish(event);
    }
View Full Code Here

        object.publish(event);
    }

    public void testTrueFilterListener() {
        SCAObject object = new TestSCAObject("foo", null);
        Event event = new TestEvent();
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        listener.onEvent(EasyMock.same(event));
        EasyMock.expectLastCall();
        EasyMock.replay(listener);
        object.addListener(new TrueFilter(), listener);
View Full Code Here

    }

    public void testFireListener() {
        TestContainer container = new TestContainer("foo");
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        Event event = new TestEvent();
        listener.onEvent(EasyMock.eq(event));
        EasyMock.replay(listener);
        container.addListener(listener);
        container.publish(event);
        EasyMock.verify(listener);
View Full Code Here

    public void testRemoveListener() {
        TestContainer container = new TestContainer("foo");
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        EasyMock.replay(listener);
        Event event = new TestEvent();
        container.addListener(listener);
        container.removeListener(listener);
        container.publish(event);
        EasyMock.verify(listener);
    }
View Full Code Here

    }

    public void testFalseFilterListener() {
        TestContainer container = new TestContainer("foo");
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        Event event = new TestEvent();
        EasyMock.replay(listener);
        container.addListener(new FalseFilter(), listener);
        container.publish(event);
        EasyMock.verify(listener);
    }
View Full Code Here

    }

    public void testTrueFilterListener() {
        TestContainer container = new TestContainer("foo");
        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
        Event event = new TestEvent();
        listener.onEvent(EasyMock.eq(event));
        EasyMock.replay(listener);
        container.addListener(new TrueFilter(), listener);
        container.publish(event);
        EasyMock.verify(listener);
View Full Code Here

        }
    }

    public void testOnEvent() {
        CompositeComponent composite = new CompositeComponentImpl("parent", null, null, null);
        Event event = new Event() {
            public Object getSource() {
                return null;
            }
        };
        RuntimeEventListener listener = createMock(RuntimeEventListener.class);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.event.Event

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.